Skip to content

JAX 2022: "Wie Daten-Versionen in Front-Ends von Java-Anwendungen zeigen?" ("How to Show Version Histories in Java Application Front-Ends?")

Published on · Updated on · 3 min read
W-JAX logo

Share

Logistics

Conference

JAX Hybrid 2022 was a hybrid conference in Mainz, Germany, held May 2-6, 2022.

Talk

My talk was on May 3, 2022, from 16:45 to 17:45.

Abstract

German

Anwendungen wie Dropbox und OneDrive speichern alte Versionen von Dateien. Dieser Versionsverlauf zeigt uns dann, wer was wann wie geändert hat. Was wäre, wenn die Front-Ends unserer Java-Anwendungen auch solche Versionsverläufe hätten? Uns sogar zwei Versionen vergleichen lassen würden? Unsere Anwender würden das toll finden, weil sie so wichtige Änderungen selbst finden könnten. Und zufriedene Anwender wenden sich seltener an den Kundendienst!

Wie bekommen wir nun Versionsverläufe in unsere Java-Anwendungen? Wir müssen dafür Versionen im Back-End speichern und im Front-End anzeigen. Dieser Vortrag vergleicht vier Möglichkeiten zum Speichern von Versionen: Do-It-Yourself, die Open-Source-Projekte Hibernate Envers und JaVers, und kommerzielle Produkte wie Datomic oder Crux.

Im zweiten Teil des Vortrags diskutierte ich meine Erfahrungen mit JaVers in einer Spring-Boot-Anwendung. Diese Anwendung hat ein Web-Front-End (Angular) und native Apps für iOS und Android (Flutter). Mein Ansatz war die Versionierung der DTO für das Front-End. Dadurch konnte ich die Komplexität der Speicherung und Anzeige der Versionen dramatisch verringern. Abschließend hob ich typische Probleme mit JaVers und deren Lösung hervor.

English translation

Applications like Dropbox and OneDrive keep a version history for files. That history shows who changed what when how. What if Java application front-ends had such version histories? Even let us compare any two versions? Users would love it because they could find important and otherwise invisible changes themselves. And happy users contact our support less often!

So, how to add version histories to Java applications? We need to store versions in the back-end first and then show them in the front-end. This talk compares four ways to store versions: Do-It-Yourself, the open-source solutions Hibernate Envers and JaVers, and commercial platforms like Datomic or Crux.

Next, I discuss my experiences with using JaVers in a Spring Boot application for my SaaS start-up. I dramatically reduced complexity here by versioning the Data Transfer Objects I had already built the front-end for anyway. And my application can show and compare any versions. Finally, I highlight typical issues with JaVers and how to solve them.

Who Made Me the Expert?

I’ve been a Java developer for 26+ years and still write code nearly every day. As an editor on InfoQ’s Java team, I knew what was going on in the Java world. In the QCon London 2022 and QCon Plus Spring 2022 program committees, I helped organize the Java and front-end tracks — that kept me close to industry trends, too.

I don’t sell books or training courses, and I’m not a developer advocate. I do donate US$10/month to the JaVers project, which I discuss in this talk. I use six criteria for my evaluation. You may use my criteria, pick your own, or weigh my criteria differently than I do — you decide!

Historical note (as of May 2022): After the talk, attendees could rate it live and leave feedback via Mentimeter. That poll is no longer reachable today.

Slides

The slides are available as a PDF. They’re 10.6 MB:

Download slides (PDF)

Historical note (as of May 2022): Back then, the slides were also available in their original Keynote format with less text and animations; that file is no longer available today.

Additional Talk Information

Here are the four candidates for creating versions:

Getting Started with JaVers

So you want to add an audit log to your application with JaVers yourself? Wonderful! My Getting Started guide can help.

Getting Started with JaVers