The Guide to Java Frameworks

Updated:

Which frameworks and libraries do you need to know as a Java developer?

Are you just about to graduate? Maybe you might be wondering which Java frameworks you should learn.

Here’s my guide to the most popular Java frameworks in use today.

This guide will help you decide which frameworks to study, to kickstart your growth as a modern Java software developer.

But first, I want to share a personal story!

You can’t learn everything

When I first started as a Java developer, I wanted to learn absolutely everything going.

I experimented with most of the frameworks in the list below, and I also tried some frameworks that no longer exist.

At the start, I thought I needed to know everything in order to get access to the most jobs.

But I didn’t get far beyond the simple “Hello world” examples, and so I knew only a little of each framework.

I soon found out that you don’t need to know everything. Java has a huge ecosystem of frameworks and tools, and you can never possibly know them all.

In fact, when you look for Java developer jobs, you will usually find that they are focused on a certain set of frameworks.

This is because most companies settle on a set of tools and frameworks that they use in-house. This helps standardise their applications, and makes them easier to maintain (instead of using a whole bunch of different frameworks all the time).

In this guide, you’ll learn about the top Java frameworks and how you can start to master them.

The frameworks

Here’s the top Java frameworks and their vital stats:

  Created GitHub stars Supported by Licence
Spring 2005 21,945 Pivotal Apache 2
Play 2007 10,545 Lightbend Apache 2
Grails 2005 2,337 OCI Apache 2

Spring

Spring isn’t just a framework. It’s an entire ecosystem of tools and libraries for Java developers. You can build lots of different styles of Java applications with Spring.

It starts with Spring Framework. This is a framework for developing Java applications which follow an approach called dependency injection. This is a way of structuring your application so that the components (your Java classes) can be developed and tested independently, and easily swapped.

Spring Framework incorporates Spring MVC (Spring’s framework for web applications), plus many other core technologies, for things like: data validation, internationalisation, testing and database support.

Spring facts:

Spring Boot

Spring Boot is a sub-project of Spring. It’s a Java application in a box. It’s a template and components that allow you to get started building Spring applications quickly, without you having to write a lot of code.

Spring Boot calls itself an opinionated framework. This means that Spring Boot provides a standard way of using different libraries together. It pre-configures many things for you, using a default approach.

It is very easy to jump into Spring Boot, and there are tons of tutorials online. Thanks to its tight integration with lots of Java libraries, Spring Boot is probably the fastest way to get started building a web application in Java.

Play

Play is a reactive framework for building web applications for the Java Virtual Machine (JVM).

Like Spring, it has a Model-View-Controller (MVC) architecture, but it doesn’t use Java Servlets to serve web applications. Instead, it uses its own system for handling requests, which is built on top of the Akka HTTP project.

Play is also stateless. This means that no session data is stored about the user on the server (unlike other, classic Java web architectures).

It’s a little bit more complex for beginners to understand, because reactive programming isn’t taught everywhere (yet). But because it’s asynchronous, it can be really fast.

Play is available for both Java and Scala.

Play framework facts:

Grails

Grails is a web framework that uses the Groovy language. (It was originally called Groovy on Rails, in homage to the Ruby framework Ruby on Rails).

The Groovy language is a lightweight scripting language that’s pretty easy for non-Java developers to pick up. But since Grails is built on Java, you can use existing libraries or any custom components that you wish.

There’s also a range of plugins available for Grails.

Since version 3, Grails runs on Spring Boot. So you’ll need to understand a little of Spring Boot first.

Grails facts:

Leave a Comment

You can use Markdown in your comment. To write code, indent lines by 4 spaces.