How to Build Java Applications Today: May 31, 2021
Tags: java, bpf
Published: 2021-05-31 22:29:12

---
canonical_url: https://bpfnl.substack.com/p/how-to-build-java-applications-today-92f
---

## TL;DR
Microsoft’s OpenJDK builds officially released, new cloud database FaunaDB, continuous testing in Quarkus 2.0, Jakarta EE 9.1, GraalVM 21.1, and Spring Integration for AWS 2.5.

***

## README
This is **issue 38** of my weekly newsletter, “How To Build Java Applications Today”. “Java news with a smile”: I read all the Java newsletters, so **you** don’t have to!

If you like my newsletter, then [subscribe to it on Substack](https://bpfnl.substack.com), read it on [dev.to](https://dev.to/ksilz/series/11995) or the [Java Cafe](https://thejavacafe.com/ksilz/series/1)! Even better: Share it with people who may be interested.

***

## Quote of the Week
*Reading is to the mind what exercise is to the body.‌*
[Richard Steele](http://www.quotationspage.com/quote/26854.html), Irish writer [(1672-1729)](https://en.wikipedia.org/wiki/Richard_Steele), surely wasn’t talking about Facebook or Twitter.

***

## Stand-Up
It’s Memorial Day in the US and Spring Bank Holiday today. So I hope that you enjoy your day off! Here in Milton Keynes ([near London](https://en.wikipedia.org/wiki/Milton_Keynes)), the temperature is 22 degrees Celsius or 72 degrees Fahrenheit. Or, as it’s known here in the UK: a heatwave. Look, guys, I’m sorry, but where I’m from (Germany), a heatwave starts with 30 degrees Celsius/86 degrees Fahrenheit.

My recent talk at JJUG CCC Spring 2021 [is now on YouTube](https://youtu.be/kQxTuZ8bUI0). So in less than 40 minutes (or 20 minutes at double speed), you can find out how we Java developers should build new web applications and native iOS & Android apps today and what we should do on the desktop. If you like what you saw, [my talk page](https://betterprojectsfaster.com/learn/talks-jjug-spring-2021-how-to-build-front-ends/) has more videos, additional information, and links to get started.

I also found out last week that [W-JAX Munich](https://jax.de/munich/) accepted two of my talks. W-JAX is a hybrid conference for Java, architecture, and software innovation (November 8-12). So which talks am I to give? [Find out on my blog](https://betterprojectsfaster.com/blog/talks-w-jax-2021-jhipster-and-data-versions/)! Shameless click-baiting, I know…

***

## Bookmarks
### Java
#### Microsoft’s OpenJDK Builds Officially Released
Last week, I wrote about why Microsoft has its own OpenJDK distribution: backports & trust (see the aptly named section “Microsoft’s Reasons For Their Own JDK: Backports & Trust” in [issue 37](https://bpfnl.substack.com/p/how-to-build-java-applications-today-010)). Now that OpenJDK distribution is out of beta, we can [download it at Microsoft](https://www.microsoft.com/openjdk) for Windows, macOS & Linux. Or we can use the [Docker container images](https://docs.microsoft.com/en-gb/java/openjdk/containers).

Microsoft only released Java 11 builds into production for now. Java 16 builds are in early access, with no production release date given. Only time will tell how fast Microsoft will publish their builds after Oracle releases a new Java version (such as the upcoming Java 17).

As I said before, Google’s now the only major cloud vendor without its own Java distribution. It’s unfair to blame them for that, though, as they were embroiled in a Java lawsuit with Oracle until two months ago. But they won (see section “Google Wins Java Court Case Against Oracle” in [issue 30](https://bpfnl.substack.com/p/how-to-build-java-applications-today-b67)). Time will also tell if Google **is** more interested in inventing new programming languages than “dressing up” existing ones (like Java). 

Finally, time will tell for sure that you shouldn’t use the same worn-down phrase twice in the same article. 

[Announcement blog post](https://devblogs.microsoft.com/java/announcing-general-availability-of-microsoft-build-of-openjdk/)

***

### Frameworks & Libraries
#### FaunaDB - A New “Kitchen-Sink Cloud Database”
When choosing technologies for our Java applications, “Pick something boring” is a good rule of thumb. It means going for established technologies with a broad user base that already went through all the problems that we may experience. You know, so that Google & Stack Overflow can give us answers quickly! And nowhere is that as true as in data storage: If our database corrupts our data, we’re hosed. Fortunately, there’s MySQL and PostgreSQL and a host of NoSQL data stores - and that’s just the open-source side.

So how do you launch a new **commercial** database into this environment? Let’s look at [FaunaDB](https://fauna.com) as an example. 

Step one: You throw [everything but the kitchen sink into your product](https://fauna.com/features): Relational and document storage, ACID transactions and global cloud distribution, triggers and stored procedures, GraphQL, built-in temporal queries for auditing, and built-in multi-tenancy. A big downside: We must use the “FaunaDB Query Language” because SQL didn’t make it into this sink. So what’s FDB like?

Unlike SQL, [FQL is not declarative, but “expression-oriented”](https://docs.fauna.com/fauna/current/start/fql_for_sql_users). A `SELECT * FROM dept WHERE deptno = 10;` in SQL turns into two FQL expressions. First, we must create an index:
```
CreateIndex({
  name: "all_depts",
  source: Collection("dept")
})
```

Then we can query that index:
```
Map(
  Paginate(
    Match(Index("dept_by_deptno"), 10)
  ),
  Lambda("X", Get(Var("X")))
)
```

Well, love at first sight, it ain’t. But then I’m an old dog, this is a new trick, and you know what they say about these two.

Let’s get back to FaunaDB. Step two in their plan for world domination: You declare that your product is in a new category all by itself. Naturally, it’s the best (and only product) in that category and evades immediate comparisons to all that was before: There were relational databases, and the 2010s saw the rise of NoSQL. But now’s the time for FaunaDB, a “cloud-native database” (my words, not theirs). Well, maybe.

Step three: You mention in every second sentence that the people behind FaunaDB worked for Twitter. Seriously, listen to [this podcast interview](https://www.se-radio.net/2021/05/episode-460-evan-weaver-on-faunadb/) with one of the founders. If my drinking game was downing a shot every time I hear “Twitter”, I’d be wasted halfway through the podcast! But I’d do the same if I was them: They’re selling a new **database**, man, so they have to “borrow authority” any way they can!

Look, FaunaDB certainly has some enticing features. But it’s the **opposite** of boring technology. So, should we use it? Generally, no. But in a world of microservices, it certainly is easier to give it a try in a little microservice over there in the corner…

[FaunaDB home page](https://fauna.com)

***

#### Continuous Testing in Quarkus 2.0
How do you compete with the 800-pound gorilla? That question must be on the minds of the [Quarkus](https://quarkus.io) team. The “JRebel 2021 Java Technology Report” gave Spring Boot 62% market share - and Quarkus 6% (see the section of that same name in [issue 27](https://bpfnl.substack.com/p/how-to-build-java-applications-today-4b3)). And Quarkus’ biggest differentiator - small & fast native images for programs through GraalVM - will probably evaporate this November with Spring Boot 3 (or whatever it’ll be called - see section “The Empire Strikes Back: Spring Native Beta Announced”, also in [issue 27](https://bpfnl.substack.com/p/how-to-build-java-applications-today-4b3)).

One answer is “Developer Joy” (listed as reason 3 out of 3 on the [Quarkus homepage](https://quarkus.io)). Take the time between “I changed my code” and “My changed code runs” as an example. Spring Boot doesn’t give us much joy there: It’s got a hot reload agent, but not a very capable one. So I pay for a [JRebel](https://www.jrebel.com/products/jrebel) license out of my own pocket because it saves me from a lot of Spring Boot restarts. 

Now, did you know that Quarkus can even [hot reload inside a Kubernetes pod](https://developers.redhat.com/blog/2021/02/11/enhancing-the-development-loop-with-quarkus-remote-development#)? That puts Spring Boot to shame! Why doesn’t Quarkus shout that from the mountain tops and its homepage? Beats me.

Now Quarkus gives us developers even more joy. At least the ones who have unit tests. I know, we’re all supposed to have unit tests. We’re also supposed to eat our broccoli and floss every night, but we don’t. Anyhow, if you have unit tests, then Quarkus 2.0 (expected by mid-June) [does this](https://quarkus.io): ”Your test suite will be run once at the start, and then continuous testing will run your tests as you are coding, and tell you if your changes will break any tests.” Joy to the world!

I think this is a smart move by Quarkus. They can’t out-integrate Spring Boot because **everybody** integrates with Spring Boot. So they pick a few things they can do easier in their new code base than Spring Boot can. After all, the Spring framework [is 17 years old](https://en.wikipedia.org/wiki/Spring_Framework#Version_history) by now. Good luck, guys! I hope you get Spring Boot to up their game - so that someday, I don’t have to pay for my JRebel license anymore! 😌

[Article](https://www.infoq.com/news/2021/05/quarkus-2-0-continous-testing/)

***

### Releases
#### Jakarta EE 9.1
Jakarta EE launched late last year (either November-ish or December 8 - [don’t ask](https://betterprojectsfaster.com/blog/weekly-links-2020-11-23#jakarta-ee-9httpswwwinfoqcomnews202011jakarta-one-conference-2020)). So what’s new in 9.1?

Two words: Java 11. Originally, Jakarta EE 9.0 was to ship with that, but the feature [was dropped to release in 2020](https://www.infoq.com/news/2020/10/the-road-to-jakartaee-9). See for yourself: The [Jakarta EE 9.0 web profile](https://jakarta.ee/specifications/webprofile/9/jakarta-webprofile-spec-9.html#web-profile-definition) lists identical API versions as [the 9.1 web profile](https://jakarta.ee/specifications/webprofile/9.1/jakarta-webprofile-spec-9.1.html#acknowledgements-for-jakarta-ee-9-1).

Dear Jakarta EE team: I know you had your plate full over the last few years. First you [fought with Oracle lawyers over the “Java EE” trademark and lost](https://www.zdnet.com/article/good-bye-jee-hello-jakarta-ee/). Then you [settled into Eclipse](https://jaxenter.com/jakarta-ee-8-release-interview-eclipse-161955.html) and [renamed packages from `javax.` to `jakarta.`](https://www.infoq.com/news/2020/10/the-road-to-jakartaee-9/). And then you got the Java 11 support out of your system. But now I think you finally should add some new features! How else are you going to compete with Spring Boot, Quarkus, and all the other guys? Remember how the “JRebel 2021 Java Technology Report” threw you in the “Other frameworks” bucket (see [issue 27](https://bpfnl.substack.com/p/how-to-build-java-applications-today-4b3))? Ouch! So dust yourself off and deliver! Spring Boot can use some more competition. I probably don’t tell you anything new here, but I just want to be on the safe side.

[Article](https://www.infoq.com/news/2021/05/graalvm-21-1-supports-jdk16/)

***

#### GraalVM 21.1
This maintenance release has experimental support for Java 16. Node.js is now an optional dependency, bugs were fixed, and things are generally faster and better now. Told you it was just a maintenance release!

[Article](https://www.infoq.com/news/2021/05/graalvm-21-1-supports-jdk16/)

***


#### Spring Integration for AWS 2.5
This project is not part of [Spring Cloud](https://spring.io/projects/spring-cloud) anymore but has its [own organization](https://awspring.io). “awspring.io”? I can’t decide if the new name is cute (“Aw - Spring!”) or a spelling mistake (there are two “s” in “AWS Spring”). The [list of changes](https://github.com/spring-projects/spring-integration-aws/releases/tag/v2.5.0) is really small - the switch to [Spring Integration 5.5](https://spring.io/blog/2021/05/19/spring-integration-5-5-goes-ga) being the biggest change.

[Announcement](https://spring.io/blog/2021/05/20/spring-integration-for-aws-2-5-goes-ga)

***

## About
Karsten Silz is the author of this newsletter. He is a full-stack web & mobile developer with 22 years of Java experience, author, speaker, and entrepreneur. Karsten got a Master's degree in Computer Science at the Dresden University of Technology (Germany) in 1996.

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

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), and [GitHub](https://github.com/ksilz). Karsten is an [author at InfoQ](https://www.infoq.com/profile/Karsten-Silz).