10 Best Java Frameworks to Use in 2021

Dr. Lofi Dewanto
Mar 6 · 5 min read

Or how you can get the best out of it…

© Java Oracle

Java is a robust language and bla bla bla. We already know this since Y2K Millennium Bug but most of us actually really realize the advantages of Java from Bruno Borges, one of the famous Java Champion (although in the beginning I thought people speak Portuguese in Brazil and not Java).

If you are just starting with Java, see Java live in action bla bla bla you need to know to start working with the frameworks. Yes, without frameworks your life is useless.

What Are Java Frameworks? Why Frameworks?

Hopefully you are aware now why we need frameworks. Now ladies and gentleman here are the winners for 2021!

1. Spring

© Spring Framework

What is Spring? Please <<copy&paste the definition of Spring Framework here>> from somewhere (there are millions out there). We already know a lot about Spring and Spring Boot, so, don’t leave home without Spring Boot if you don’t want to get wet on your feet.

2. GWT / J2CL

© GWT Project

This is my favorite and may be underestimated by a lot of Java developers. Therefore I put this framework on the second place.

Most comments I’ve heard so far about GWT: “Is GWT not dead?” and my answer was and is always no, it’s not dead, bla bla bla. GWT has survived the Killed by Google story and it’s already there since 2006 / 2007, so GWT must be really useful. J2CL is the new development of Java to JavaScript transpiler and I hope to see GWT 3 to be able to embrace J2CL as its transpiler.

If you have questions about GWT just ask at Gitter or Google Group. The community is very helpful and you’ll see over there some Java / JavaScript gurus like Colin Alworth (transpiler GWT / J2CL guru from Vertispan, you can ask him anything about JavaScript and he knows the answer. OK, sometimes I need to read his answer 10 times before I really understand it, but it’s because of me, I think), Thomas Broyer (Maven GWT Plugin), Dmitrii Tikhomirov (Red Hat, also fun stuff like Quake2 with GWT / J2CL, damn this is cool, I love Doom and Quake without being a disk jockey with 10 floppy diskettes), Ahmad K. Bawaneh (DominoUI), MDProctor (not sure what’s his real name, Red Hat), Mark Kevin Baldemor (GWT Material Design), Frank Hossfeld (NaluKit), Harald Pehl (Red Hat, Elemento), Adrien Baron (VueGWT), Peter Donald (move from TypeScript back to GWT because of performance, optimize everything, creator of React4j) and a lot more. Just watch the discussions about JS / transpilers by yourself and you’ll learn automagically the JavaScript “mental model”.

Get started with learning GWT here.

3. Hibernate

© Hibernate Project

In JPA implementation Hibernate is still the King (OK, it’s not because of the name of the founder Gavin King). If you need JPA in your Java app you will need Hibernate and if you need Hibernate you’ll be sure to know Vlad Mihalcea, which targets seems to optimize the Hibernate world for you. BTW I already asked him, whether he would put all his know-how into an intelligent JPA / Hibernate generator, so we won’t need him anymore. I’m not sure whether he likes my idea.

4. Maven

© Apache Maven

Maven is a standard build and dependency management in Java. This tool / framework is the most sensational tool in Java world. You feel love and hate at the same time if you are using Maven for the first time, so it feels just like watching the film Eat Pray and Love. Hate Pray and Love would be the best situation I feel after using Maven for a long time. But what are the alternatives? Gradle, which is always better than Maven? Bazel, super lightning fast and faster than your programming action (for this purpose you need the whole cloud for yourself)? Nope, so far no alternative for all Java developers.

Today Maven also speaks polyglot. For Bruno Borges Maven with YAML could be the best choice.

5. Mockito

© Mockito

Actually I realize how easy to write unit test after I use Mockito (no, please do not drink and programming). If you want to have a good quality of your app, you need to learn how to use Mockito. Here is an example.

@Test
void getting_stuffs_from_enclosing_div() {
// Prepare for a take off
doReturn("data")
.when(applicationDiv).getDataFromDiv(Mockito.any());
doReturn(MY_CONST)
.when(applicationDiv)
.getDataFromDiv(DivDataName.MY_OTHER_CONST.toString());
doNothing().when(applicationDiv).callKey();
// Drink it
applicationDiv.postConstruct();
// Verify, enough to drink?
Arrays.stream(DivDataName.values())
.forEach(divDataName -> verify(applicationDiv)
.getDataFromDiv(divDataName.toString()));
}

If you understand, what this test is doing, you could think of doing drink and programming would be a no problem for you.

Conclusion

Damn, actually I cannot find more than five frameworks which you should learn in 2021. How could those articles find 10 plus 11 extra frameworks for Java? 21 frameworks all together, that’s a lot folks or is it because of year 2021 and Corona lock down?

There are many other Java frameworks that are not full-stack or web development frameworks but are useful in every application — like log4j for logging, JUnit, and Selenium for testing and so on. It is essential to know about these though you can just learn them on bla bla bla.

That’s it for now, enjoy your weekend, learn well and stay WORA-WORA!

Star Gazers

“If you want to master something, teach it.”

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store