How to Build Java Applications Today: March 1, 2021
New sections, profiling in production, Quarkus vs Spring Boot in JHipster, Jakarta EE 2020/2021 survey results, the $500 million screen, and ops-friendly containers.
README
This is issue #25 of my weekly newsletter “How To Build Java Applications Today” - for Java developers by a Java developer.
This week sees a host of new sections in this little newsletter of mine. And because this is a Java developer newsletter, they have appropriate names: “Code Review” talks about any feedback I get, “Bug Reports” about errors I made, and “About” talks, well, about me. I also turned “Introduction into “README“ and “Weekly Links” into “Bookmarks”.
Last week, I presented “How Should Java Developers Build Front-Ends for Web, Mobile & Desktop Today?” to the LJC. You’ll find the video next week on my talk page. My side project got some love, too, but you won’t see the results until later this year, if at all.
Code Review
Issue from February 22, 2021, “Weekly Links - Java - Java on ARM Processors”
A reader told me that the “ARM puns in this week's newsletter made my day ;-)“. Awww… T., your comment made my day! And S. told me that he “loves the new newsletter”. Thanks a bunch!
So this is bad news for the rest of you: At least one person likes my attempts at being funny. I feel emboldened! Because if we Germans are known for one thing, it’s our splendid sense of humor… 🧐
If you want to tell me something, good or bad: Say it on Twitter (@karsilz) or on LinkedIn!
Bug Reports
Issue from February 15, 2021, “Introduction“
There are only two hard things in computer science: Cache invalidation and naming things. I’d like to add “counting newsletters” to the list, at least to mine. Why? I called the February 15 “issue #22” - just like the issue from the week before. I even put it in bold… 😔 That’s why there’s no issue #24, and this issue is issue #25. See, that’s what editors are good for!
Quote of the Week
Two ears, one mouth. Use them in that percentage.
Dave West (in an episode of the “Engineering Culture by InfoQ” podcast, at 21:25)
Bookmarks
Java
Profiling in Production?
In an airplane, a flight recorder continuously records what happens. This helps in investigating accidents. We also know flight recorders as “black boxes”. They aren’t really black, though, rather bright-orange. I suppose that’s fine: After all, there are no dogs in “dog biscuits”, either.
Anyhow, wouldn’t we love to have such “flight recorders” in our Java programs? That tell us what went wrong there? And in production, nevertheless? Well, Java has such a tool! It’s called the “JDK Flight Recorder” (JFR). Oracle open-sourced it with JDK 11. Today, Oracle claims that JFR just adds 1% overhead to the monitored Java application. So we could use it in production! And it gets better in the upcoming Java 16, where it can record memory allocation more efficiently. The latest “Inside Java” podcast episode tells you all about it!
Unfortunately, JFR doesn’t work with the OpenJ9 JVM. And for an alternate take on profiling in production and all the problems it brings, check out this talk from the last JChampions Conference.
Podcast episode & YouTube version (with 2x speed available)
Frameworks
Quarkus vs Spring Boot in JHipster
I’m a big fan of the Java code generator JHipster. Among other things, it allows you to compare two technologies quite quickly. Such as Spring Boot, the 500-pound Gorilla of Java frameworks, and Quarkus, a humble challenger (“Supersonic Subatomic Java“ - what does that even mean?!). So what are the differences in the sample applications?
No suprises here, I guess: Spring Boot is less wordy than Quarkus. But Quarkus is much faster and uses a lot less memory. Quarkus achieves most of those gains through GraalVM. Spring Boot 3, based on Spring 6, is “expected” to support GraalVM out of the box in the fall of 2021. Quarkus, your move!
Jakarta EE 2020/2021 Survey Results
Talking about Spring Boot challengers: The framework formerly known as “Java EE” published the results from is annual survey. You know that containers haven’t won completely when some people still use application servers!
I used Java EE 20 years ago. Then it was Tomcat, and now it’s Spring Boot. Still, I found some interesting tidbits. For instance, IBM’s WebSphere is the only application where more people hate it than the combined number of “like it” or “love it”. And it’s not even close: 28 vs. 18. Ouch… And then there’s MicroProfile, the “Spring Boot with Java/Jakarta EE parts plus new stuff”. It’s deliberately separate from Jakarta EE - see last week’s issue, “JakartaOne Livestream 2020“. But the kids want mommy and daddy to stop fighting: 61% want “MicroProfile joining up with Jakarta EE”. 🤔
User Experience
The $500 Million Screen
In America, people say “you look like a million bucks” when you look excellent. Now Oracle’s banking software Flexcube has a screen that looks like “500 million bucks” to Citibank - and they feel awful about it!
The short version of this story is that in August 2020, Citibank wanted to pay US$7.8 million interest on loans. Because of poor usability on a Flexcube screen, it paid the loans back in full instead - to the tune of US$900 million! Citibank got US$400 million back. But a federal judge in New York ruled that Citibank has no right to get the remaining US$500 million back. Citibank will appeal, naturally. Read the article for all the details!
The article has a picture of the screen in question. Three observations:
This really looks like a usability disaster waiting to happen.
I really forgot how ugly enterprise software can be.
Is that a Java Swing application?!
Now to all of you out there who suffer from ugly, unusable enterprise software day in, day out: Sometimes, somebody has to pay for your pain. Maybe this time it’s Citibank.
DevOps
How To Create Ops-Friendly Containers
Containers are the present of Java deployment for many of us and the future for the rest. But they force us to un-learn many best practices from our container-less past. This article lists some of them.
For instance, I still remember how I used to put rotating log files into my Java applications. Now you just log to - wait for it: Standard output! Is this “Hello, world!”?! Environment variables replace multiple configuration files. And putting the database into the Java application container is a big no-no!
About
Karsten Silz is the author of this newsletter. Karsten has been a Java developer for 22 years in Europe and the U.S. In 2004, he co-founded a software product start-up in the U.S. Karsten led product development there for 13 years until the company was sold successfully. Since 2017, he has worked as a full-stack Java contractor in Germany and the U.K. Karsten has this newsletter, a developer website, and a contractor site. He's on LinkedIn, Twitter, and GitHub.