How to Build Java Applications Today #72
Tags: java
Published: 2023-02-01 06:41:44

## TL;DR

Java had patch releases, we can now write command-line interfaces with Java, and this book will save IntelliJ users tons of time.

***

## README

Welcome to the February 2023 issue of my newsletter “How To Build Java Applications Today”! If you like it, then [subscribe to it for free on Substack](https://bpfnl.substack.com)! Or read it on [dev.to](https://dev.to/ksilz/series/11995) or [Medium](https://ksilz.medium.com). Even better: Share it with people who are interested!

***

## What's This?
In my monthly "Java Full-Stack Report", I **recommend** IDEs, build tools, JVM languages, databases, back-end frameworks, web frameworks, and mobile app frameworks. I also cover essential **releases** and **news**.

This report is different because it measures popularity by **observing what all Java developers do**: **job ads** from 59 countries, **online training** students, **Stack Overflow** questions, and **Google** searches. My recommendations are based on that popularity, industry analysis, and my 24 years of Java experience. 

**Why popularity?** Because picking a popular technology makes our developer life easier: easier to learn, easier to build, debug & deploy, easier to find jobs/hire, and easier to convince teammates & bosses. Now popularity can make a difference in two situations: When multiple technologies score similarly, we could go for the **most** popular one. And when a technology is very unpopular, we may **not** use it.

***

## Stand-Up


I told you that I started a new Java contract on January 3. Two sprints in, I can share that I'm working with some technologies I haven't touched before. Namely Spring Boot 3, Kubernetes, MongoDB, and React. After many years, I also work with Maven again &mdash; and realize I still like Gradle a lot better.

***

My first conference talk of the year is at Germany's biggest Java conference, JavaLand. It's about when native Java with GraalVM is worth it. As it seems to have become a tradition, I first give my conference talk to the London Java Community (LJC). I was already booked for a regular online talk in early March when suddenly, a slot opened up at LJC Live on February 16. That's a monthly on-site event with two speakers. And [I'm now one of them](https://betterprojectsfaster.com/learn/talks-ljc-live-2023-native-java-worthwhile)! This cuts my preparation time a bit short. But who says that deadline pressure is wrong?! 😅 So if you're in London on February 16, I'd love to see you at LJC Live!

***

Last year, I talked about Google's Flutter [at QCon London](https://betterprojectsfaster.com/learn/talks-qcon-london-2022-flutter-one-codebase) and then [at QCon Plus](https://betterprojectsfaster.com/learn/talks-qcon-plus-spring-2022-flutter-one-codebase). The QCon Plus talk was prerecorded. I edited it myself, so it's quite polished, if I may say so. 😏  And that talk is now public on InfoQ  &mdash; as a video and text transcript. So if you want to know about Flutter, [view or read for yourself](https://www.infoq.com/presentations/google-flutter-cross-platform/)!

***

## Technology Index (Last Update: January 2023)

### IDEs

- **Popularity trend:** Eclipse is the most popular Java IDE and leads IntelliJ in job ads 2.5:1, though it has declined over many years in other categories. IntelliJ holds up well for a commercial product: It's only slightly behind Eclipse in Google searches and slightly ahead in questions at Stack Overflow. NetBeans is the least popular IDE. VS Code isn't a fully-fledged Java IDE, but apart from jobs, it's 3-4 times as popular as Eclipse & IntelliJ.
- If you **don't want** to spend money, then use **Eclipse**.
- If you **may** spend money, evaluate **IntelliJ**.
- Evaluate **VS Code** for non-Java work, like web development (I use it for all my websites).
- If you're using **NetBeans**, consider moving off of it.

**[Show Popularity & Details](https://betterprojectsfaster.com/guide/java-full-stack-report-2023-02/ide)**

***

### Build Tools

- **Popularity trend:** Maven is 2.5 times as popular as Gradle, except for Stack Overflow, where Gradle is slightly ahead. Ant and sbt have declined for years.
- If you use Scala, then use **sbt**.
- Otherwise, if you absolutely cannot stand XML files and/or need to customize your build heavily, then use **Gradle**.
- Otherwise, use **Maven**.

**[Show Popularity & Details](https://betterprojectsfaster.com/guide/java-full-stack-report-2023-02/build)**

***

### JVM Languages

- **Popularity trend:** Java is #1, Kotlin #2, and Scala #3. Java probably wins in job ad mentions where Scala also leads Kotlin. But Kotlin leads Scala in all other categories. Groovy and Clojure have mostly declined for many years. Python and JavaScript beat Java everywhere, but the job ad mentions rankings are unknown.
- On your current project, **keep your existing language** unless that language is absolutely, really not working out for you.
- If you need to switch languages or are on a new project:
  - Use **Scala** if you need functional programming.
  - Use **Kotlin** if you really need a "more modern Java".
  - Otherwise, use the **latest Java LTS version** you, your team, and your application can take.

**[Show Popularity & Details](https://betterprojectsfaster.com/guide/java-full-stack-report-2023-02/lang)**

***

### Databases

- **Popularity trend:** MySQL is #1, Postgres #2, and MongoDB is #3. After some turbulence, MySQL and MongoDB are back to their October 2021 values: MySQL leads Postgres 1.4:1, MongoDB has 70% of Postgres' numbers. Postgres and MongoDB are nearly at peak values at Stack Overflow.
- On your current project, **keep your existing database** unless that database is absolutely, irrevocably, really not working out for you.
- If you need to switch databases or are on a new project:
  - If you know that you'll need the NoSQL features and/or scalability, and you can't get this with MySQL, then use **MongoDB**.
  - Otherwise, use **MySQL**.

**[Show Popularity & Details](https://betterprojectsfaster.com/guide/java-full-stack-report-2023-02/db)**

***

### Back-End Frameworks

- **Popularity trend:** Spring Boot dominates and still grows in all categories except for Google searches. Despite a long decline, Jakarta EE leads Quarkus in all categories but questions at Stack Overflow. Quarkus is now #3 in job ad mentions, Micronaut is the new #4.
- On your current project, **keep your existing back-end framework** unless that framework is absolutely, really not working out for you.
- If you need to switch back-end frameworks or are on a new project:
  - Use **Quarkus** if you need the smallest possible, fastest-starting Java application **now**.
  - Otherwise, use **Spring Boot**.
  
**[Show Popularity & Details](https://betterprojectsfaster.com/guide/java-full-stack-report-2023-02/be)**

***

### Web Frameworks

- **Popularity trend:** React is #1, Angular #2, and Vue #3. React leads Angular by only 15% in job ad mentions but by 1.5-3.6 in the other categories. Vue has only 30% of Angular's job ad mentions but about 40-60% in the other categories.
- If you already use **React**, **Angular**, or **Vue** in your project, then keep using them. Otherwise, evaluate a migration. In many (most?) cases, such migration doesn't make business sense.
- If you start a new project or migrate, then start with **React** first, **Angular** otherwise, and finally, **Vue**.
 
**[Show Popularity & Details](https://betterprojectsfaster.com/guide/java-full-stack-report-2023-02/fe-web)**  

***

### Mobile App Frameworks

- **Popularity trend:** React Native dropped from a 2.9:1 lead over Flutter to a 1.9:1 since last April. Among developers, Flutter leads React Native 2:1 and pulls away (except for Google searches, where both slightly lost in 2022). Xamarin and JavaFX have generally declined for years.
- **Don't** build two separate applications with Apple's and Google's **first-party** frameworks. Use a **cross-platform** framework instead.
- If you start a new project and have used React for building web applications, then use **React Native**.
- If you start a new project and have .NET experience, then use **.NET MAUI**.
- If you start a new project and need to use a library that's only available in Java, then use **JavaFX**.
- Otherwise, start with **Flutter** first and use **React Native** if that doesn't work out for you.

**[Show Popularity & Details](https://betterprojectsfaster.com/guide/java-full-stack-report-2023-02/fe-mobile)**

***

## Release Radar

Java had patch releases, while only Quarkus had a major release. Git, IntelliJ, VS Code, Spring Boot, Quarkus, Micronaut, and Helidon also had minor releases.

I added GraalVM to the list this month. We need it to build [native Java applications](https://www.infoq.com/articles/native-compilations-boosts-java).

**Bold rows** show **major** updates, *italic rows* signal *minor* ones.

| Category | Name & Download | Version | Date | What's New | Docs |
|:-:|:-:|:-:|:-:|:-:|:-:|
| *Version Control* | *[Git](https://git-scm.com/downloads)* | *2.39.1* | *Jan 17, 2023* | *[What's New](https://github.blog/2023-01-17-git-security-vulnerabilities-announced-2)*, *[Release Notes](https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.39.1.txt)* | [Link](https://git-scm.com/docs) | |
| Build Tool | [Maven](https://maven.apache.org/download.cgi) | 3.8.7 | Dec 24, 2022 | [Release Notes](https://maven.apache.org/docs/3.8.7/release-notes.html) | [Link](https://maven.apache.org/users/index.html) |
| Build Tool | [Gradle](https://gradle.org/releases) | 7.6 | Nov 25, 2022 | [Release Notes](https://docs.gradle.org/7.6/release-notes.html) | [Link](https://docs.gradle.org/7.6/userguide/userguide.html) |
| *IDE* | *[IntelliJ](https://www.jetbrains.com/idea/download/)* | *2022.3.2* | *Jan 26, 2023* | *[What's New](https://blog.jetbrains.com/idea/2023/01/intellij-idea-2022-3-2)* | *[Link](https://www.jetbrains.com/idea/resources/)* | |
| IDE | [Eclipse](https://www.eclipse.org/downloads/packages) | 2022-12 | Dec 7, 2022 | [Video](https://youtu.be/jJau4kUoLrA) | [Link](https://help.eclipse.org/latest/index.jsp) |
| IDE | [NetBeans](https://netbeans.apache.org/download/) | 16 | Nov 30, 2022 | [Release Notes](https://github.com/apache/netbeans/releases/tag/16) | [Link](https://netbeans.apache.org/help/index.html) |
| *IDE* | *[VS Code](https://code.visualstudio.com/Download)* | *1.74.3* | *Jan 17, 2023* | *[1.74.3](https://github.com/microsoft/vscode/milestone/220)* | *[Link](https://code.visualstudio.com/docs)* | |
| *Java* | *[Eclipse Temurin](https://adoptium.net/temurin/releases/?version=19)* | *19.0.2* | *Jan 26, 2023* | *[Release Notes](https://www.oracle.com/java/technologies/javase/19-0-2-relnotes.html)* | *[Link](https://docs.oracle.com/en/java/javase/19/docs/api)* |
| *Java* | *[Eclipse Temurin](https://adoptium.net/temurin/releases/?version=17)* | *17.0.6* | *Jan 24, 2023* | *[Release Notes](https://www.oracle.com/java/technologies/javase/17-0-6-relnotes.html)* | *[Link](https://docs.oracle.com/en/java/javase/17/docs/api)* |
| *Java* | *[Eclipse Temurin](https://adoptium.net/temurin/releases/?version=11)* | *11.0.18* | *Jan 26, 2023* | *[Release Notes](https://www.oracle.com/java/technologies/javase/11-0-17-relnotes.html)* | *[Link](https://docs.oracle.com/en/java/javase/11/docs/api)* |
| *Java* | *[Eclipse Temurin](https://adoptium.net/temurin/releases/?version=8)* | *8u362* | *Jan 26, 2023* | *[Release Notes](https://www.oracle.com/java/technologies/javase/8u361-relnotes.html)* | *[Link](https://docs.oracle.com/javase/8/docs/api/index.html)* |
| *Java* | *[GraalVM](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-22.3.1)* | *22.3.1* | *Jan 24, 2023* | *[Release Notes](https://www.graalvm.org/release-notes/22_3/#2231)* | *[Link](https://www.graalvm.org/latest/docs/)* |
| *Framework* | *Spring Boot* | *3.0.2* | *Jan 20, 2023* | *[Release Notes](https://github.com/spring-projects/spring-boot/releases/tag/v3.0.2)* | *[Link](https://docs.spring.io/spring-boot/docs/3.0.2/reference/html/)* |
| *Framework* | *Spring Boot* | *2.7.8* | *Jan 19, 2023* | *[Release Notes](https://github.com/spring-projects/spring-boot/releases/tag/v2.7.8)* | *[Link](https://docs.spring.io/spring-boot/docs/2.7.8/reference/html)* | |
| Framework | Spring Boot | 2.6.14 | Nov 24, 2022 | [Release Notes](https://github.com/spring-projects/spring-boot/releases/tag/v2.6.14) | [Link](https://docs.spring.io/spring-boot/docs/2.6.14/reference/html) |  |
| **Framework** | **Quarkus** | **2.16** | **Jan 25, 2023** | **[What's new](https://quarkus.io/blog/quarkus-2-16-0-final-released)** | **[Link](https://quarkus.io/guides)** |
| *Framework* | *Quarkus* | *2.15.2* | *Jan 4, 2023* | *[Release notes](https://quarkus.io/blog/quarkus-2-15-2-final-released)* | *[Link](https://quarkus.io/guides)* |
| *Framework* | *Micronaut* | *3.8.3* | *Jan 28, 2023* | *[3.8.3](https://micronaut.io/2023/01/28/micronaut-framework-3-8-3-released/)*, *[3.8.2](https://micronaut.io/2023/01/20/micronaut-framework-3-8-2-released/)*, *[3.8.1](https://micronaut.io/2023/01/12/micronaut-framework-3-8-1-released/)* | *[Link](https://micronaut.io/docs/)* |
| Framework | Micronaut | 3.7.5 | Dec 20, 2022 | [Release Notes](https://github.com/micronaut-projects/micronaut-core/releases/tag/v3.7.5) | [Link](https://micronaut.io/docs/) |
| Framework | DropWizard | 2.1.4 | Oct 20, 2022 | [Release Notes](https://github.com/dropwizard/dropwizard/releases/tag/v2.1.4) | [Link](https://www.dropwizard.io/en/latest/getting-started.html) |
| Framework | DropWizard | 2.0.34 | Oct 18, 2022 | [Release Notes](https://github.com/dropwizard/dropwizard/releases/tag/v2.0.34) | [Link](https://www.dropwizard.io/en/latest/getting-started.html) |
| Framework | Helidon | 3.1.0 | Dec 21, 2022 | [Release Notes](https://github.com/helidon-io/helidon/releases/tag/3.1.0) | [Link](https://helidon.io/docs/v3/#/about/introduction) |
| *Framework* | *Helidon* | *2.5.6* | *Jan 20, 2023* | *[2.5.6](https://github.com/helidon-io/helidon/releases/tag/2.5.6)*, *[2.5.5](https://github.com/helidon-io/helidon/releases/tag/2.5.5)* | *[Link](https://helidon.io/docs/v2/#/about/introduction)* |

***

## New & Noteworthy

### We Can Now Write Command-Line Interfaces with Java

Command-line interfaces (CLI) need to start quickly and not use much memory. Sot that ruled out writing them in Java for most of us: Sure, Maven and Gradle start fast. But they've been tuned for years and don't use the frameworks we want to use, like Spring Boot.

 Until now, that is: [Native Java with GraalVM](https://www.infoq.com/articles/native-compilations-boosts-java/) makes it possible to write CLIs in Java!

`just` is an example of such a CLI. It doesn't matter to us that it's a Spring Boot tool. What matters is that it's a Spring Boot application starts in less than one second. On my M1 Max MacBook Pro, the application launches, displays the help screen, and quits again in 0.8 seconds:

```
% time just --help


       ██╗██╗   ██╗███████╗████████╗
       ██║██║   ██║██╔════╝╚══██╔══╝
       ██║██║   ██║███████╗   ██║
  ██   ██║██║   ██║╚════██║   ██║
  ╚█████╔╝╚██████╔╝███████║   ██║
   ╚════╝  ╚═════╝ ╚══════╝   ╚═╝

Unknown option: '--help'
Usage: just [-V] [COMMAND]
  -V, --version   Print Just version
Commands:
  run     runs Spring Boot project - either with Maven or Gradle in dev mode
            with hot reloading enabled
  help    Display help information about the specified command.
  format  formats code with Spotless
  init    initializes Just related files
  build   builds application
  kill    kills process running on port
just --help  0.80s user 0.07s system 97% cpu 0.897 total
%
```

So if you wanted to write a CLI in Java but didn't: Now's the time! Just pick a Java framework that supports native Java, like Spring Boot 3, Quarkus, or Micronaut. And build it as a native executable with GraalVM.

To the Quarkus and Micronaut fans among my readers: I know you guys could build fast CLIs for years. But I hope we can all agree that Spring Boot 3 made native Java more mainstream. 😀 Hence, this news item appears now.

**[Read the News](https://www.infoq.com/news/2023/01/just-spring-boot-cli)**

***

### This Book Will Save IntelliJ Users Tons of Time

If you are an IntelliJ user, this book will save you a lot of time! Trisha Gee, the former lead developer advocate at JetBrains, and Helen Scott, the current lead developer advocate at JetBrains, wrote it together. Trisha covers the advanced users, while Helen dishes out tips for beginners.

So, how will this book make you faster? By focusing on three areas:

- Keyboard First
- Always Green
- Staying in the Flow

[The book is on Leanpub](https://leanpub.com/gettingtoknowIntelliJIDEA) and costs 30 dollars. Saving dozens, if not hundreds of hours in the future, this book is a no-brainer for IntelliJ users!

Interested? Then read the interview with Trish & Helen.

**[Read the Interview](https://www.infoq.com/news/2023/01/know-intellij-book)**

***

### Better Debugging with Kotlin 1.8

I know, this is a **Java** newsletter. But what's wrong with occasionally looking at the other side of the fence and seeing if it's really greener? Which brings me to Kotlin 1.8, the latest release of the [#2 language on the JVM](https://betterprojectsfaster.com/guide/java-full-stack-report/lang/). And this time, the grass is brown & muddy.

Why such harsh words? Well, let's look at the list of new features:

- Better debugging by removing optimizations that mess with the debugging experience
- Built-in function for recursively copying and deleting directories
- Faster reflections
- Support for writing Gradle tasks with Kotlin for Gradle 7.2 (released August 17, 2021) and 7.3 (released November 9, 2021).

Does this grass look green to you? And the support for Gradle 7.2 and 7.3 is especially baffling to me: What took so long? These releases are more than a year old! And how do I write Gradle tasks with Kotlin in the current Gradle release, 7.6?
  
Kotlin 1.8 has more changes, but they don't concern us Java developers (like improved interoperability with Apple's Objective-C & Swift).

**[Read the Announcement](https://blog.jetbrains.com/kotlin/2023/01/kotlin-1-8-0-released)**

***

## Next Issue

The next issue will arrive on **Wednesday, March 1, 2023**. [Subscribe to this newsletter on Substack for free](https://bpfnl.substack.com) to receive the next issue automatically!

***

## About

Karsten Silz is the author of this newsletter. He is a full-stack Java developer (Spring Boot, Angular, Flutter) with 24 years of Java experience. Karsten has worked in Europe and the US and is also an author and speaker. He got a Master’s degree in Computer Science at the Dresden University of Technology (Germany) in 1996.

Karsten co-founded a software start-up in the US in 2004. He led product development for 13 years and left after the company was sold successfully. Karsten then co-founded the UK SaaS start-up "[Your Home in Good Hands](https://yourhomeingoodhands.co.uk/)" as CTO in 2020. Since 2003, he has also worked as a contractor.

Karsten has [this newsletter](https://bpfnl.substack.com/), a [developer website](https://betterprojectsfaster.com/), and a [contractor site](https://ksilz.com/). He's on [LinkedIn](https://www.linkedin.com/in/ksilz/), [Twitter](https://twitter.com/karsilz), [Xing](https://www.xing.com/profile/Karsten_Silz/), and [GitHub](https://github.com/ksilz). Karsten is also a [Java editor at InfoQ](https://www.infoq.com/profile/Karsten-Silz).