Java has seen tremendous growth as a programming language in the past several years. A lot of that popularity can be associated to the evergrowing specter of popular frameworks and their ability to handle complex tasks in a comparatively easy fashion.
Compared to the olden “dark times” of JSP, these new frameworks offer a secure, easily maintainable and scalable environments.
Following thorough research, I presenting you the list of top eight Java RESTful frameworks of 2019 that can best facilitate and streamline the process of front-end and back-end web application development.
The original list was created four years ago and what you are currently reading is an updated and curated version. Please leave a comment below if there’s something you would like to discuss, or you have a recommendation for a framework worth checking.
- CHAPTER 1 | 8 Top Java RESTful Frameworks of 2019
- CHAPTER 2 | 1. ActFramework Review
- CHAPTER 3 | 2. Light-rest-4j Review
- CHAPTER 4 | 3. Ninja Web Framework Review
- CHAPTER 5 | 4. Play Framework Review
- CHAPTER 6 | 5. RESTEasy Review
- CHAPTER 7 | 6. Restlet Review
- CHAPTER 8 | 7. Spark Framework Review
- CHAPTER 9 | 8. Spring Boot Review
- CHAPTER 10 | Ranking 8 Top Java RESTful Frameworks by Usage
- CHAPTER 11 | Ranking 8 Top Java RESTful Frameworks by Speed
8 Top Java RESTful Frameworks of 2019
Below is the list of frameworks we are going to analyze. I have used and extensively tested all of them in the past four years.
To make this list as objective as possible I’m arranging top eight frameworks in alphabetical order.
- Light-rest-4j (also known as Light Java)
- Ninja Web Framework
- Play Framework
- Spark Framework
- Spring Boot
Introduction date: 2015
ActFramework is created to make programming MVC application in Java easy and fun. In comparing with other Java MVC frameworks like Spring MVC, Struts, etc, Act focus more on expressiveness and simplicity.
While it is not micro in nature, it makes it up with modularity and speed. And when I say speed I mean speed. According to the speed benchmark by @networknt, ActFramework comes in the second place, close behind Light-4j (which is a story on its own).
ActFramework is not a servlet framework, and I like it for that. No web.xml and no container. You can boot it with the main function only.
View it as a smaller/faster brother to Spring/Spring Boot.
- Very fast, second to Light-rest-4j
- Excellent for fast prototyping
- A wide support for different security mechanism
- Small package size messuring in tens of megabytes
- A small memory feet print which makes it perfect for cloud development
- Support for Rythm templating engine
- Support for Spring MVC/Jersey routing
- Hot reload
- Surprising CLI support
- Still missing some functionalities like service governance and messaging handling.
- Small comunity so support is hard to find.
- A documentation leaves a lot to be desired as it’s a foundation of any good framework.
Introduction date: Sep 19, 2016
This framework is a RESTful API framework built on top of light-4j, which is on its own a fast, lightweight and cloud-native micro-service framework.
To my knowledge, at the time of this update, Light Java is also the fastest available Java micro-service. If you visit their website you will notice that developers are bragging about been 44 times faster than Spring Boot running in the embedded Tomcat.
- Fastest available micro RESTful framework
- Very low latency
- Cutting edge
- Small memory footprint which is important when working with Java
- Plays nice with other libraries/frameworks
- In-house dependency injection framework included so you have avoid using 3rd party solutions
- Designed for scalability
- Organized around plugins so you can make it as small as possible
- Based around JavaSE so no need for J2E
- Security first design – OAuth2 integration
- Such a fast framework has such a bad documentation, some sections are even missing.
- While it’s growing in popularity it still has a rather small following
While I’m currently working with Spring Boot I’m not planning to switch to Light-rest-4j anytime soon. While it’s much faster than Spring Boot it’s still not powerful enough to stand on its own feet. Let’s be honest, the best is usually not the right this to choose (for example VHS vs. Betamax).
Introduction date: 2012
Rating: 3.5/5 (I’m not impressed enough)
Ninja Web Framework is a full-stack web framework for Java. Stable, fast, reliable, and super productive.
It provides everything you need to develop, test, deploy, and maintain your RESTful web application (Servlets, Guice, JPA, Flyway migrations, Maven, etc.).
Just like DropWizzard, Ninja Web Framework is an integrated software stack. You don’t have to set up everything on your own, just generate a new project from using Maven archetype, import it into available IDE and start coding.
- Quick project building and bootstrapping
- XML, HTML, JSON rendering
- Other libraries are also supported, you may or may not use them (like Guice, Logback, Guava, etc.).
- Good data persistence support and caching
- Don’t like servlet container? Use any container you like.
- Don’t want to use containers at all? Use it in stand-alone mode, as a self-executing jar package bundled with Jetty.
- Again, just like with DropWizzard, provided documentation is good but not good enough. It took me some time to get acquainted. Also, this framework relies on so many other libraries that sometimes it can become cumbersome to find needed information.
- Not that famous, so expect a much smaller community. According to some rumors, this framework was built by/for Play users who didn’t like Play 2.X switching mainly to Scala. Please leave a comment below if you think this is not correct.
It sounds like a great framework, but I will leave it on the side until it matures a little bit more.
Introduction date: 2011
Play Framework makes it easy to create, build, and deploy web applications with Java & Scala. It is built on Akka, based on a lightweight and stateless architecture. It should be used for highly-scalable applications needing minimal CPU and memory resource consumption.
- Easy to develop.
- Fast though not fast as some other frameworks here.
- Built on Netty, so it supports non-blocking I/O. This makes it excellent for RESTful applications where you need to handle remote calls in parallel.
- Probably largest community among frameworks reviewed here
- Quick project building and bootstrapping
- REST, JSON/XML, Web Sockets, non-blocking I/O
- Just refresh the browser to see the recent changes.
- Async support
- Available books
- Memory footprint – Way too much to call it micro
- Version 2.0 is one of the most controversial Java frameworks. Switch to Scala made some Java developers outraged.
- It does not offer backward compatibility; Play 2.X is a total rewrite of a Play 1.X.
- For a lightweight framework (it’s marketed this way), it become somewhat bloated over time.
- SBT. Intended as a Maven “killer”, never managed to outshine/replace it. It’s hard to understand and configure.
- Not a servlet
- Breaking changes across releases
Haters gonna hate, but I still like and prefer this framework. Unfortunately, I can’t give it more than 4/5 stars, I still believe that JAX-RS based frameworks are better for RESTful web services.
Introduction date: 2009
RESTEasy is a JBoss based implementation that integrates various frameworks to help you build RESTful Web and Java applications. It is a fully certified implementation of the JAX-RS 2.0 specification, a JCP specification that provides a Java API for RESTful Web Services over the HTTP protocol.
It’s one of the oldest available frameworks with a sizeable community.
- Mature and stable product
- Relatively fast and reliable
- Built around JAX-RS 2.0 specification
- Large community
- Enterprise ready
- Existing JBoss family environment
- Spring MVC integration
- EJB support
- Excellent security support – OAuth 2.0
- So-so documentation
- Does not provide a wide range of testing tools
- It relies to much on Spring.
Though extremely fast I don’t want to recommend this framework. Lack of documentation and almost non-existing support makes this a sub-par framework. I’m giving it 3/5 stars only on account of speed.
Introduction date: 2005
Restlet is here to help Java developers build scalable and fast web APIs that following RESTful architecture pattern.
It offers powerful routing and filtering system, unified client/server Java API. It is available for all major platforms (Java SE/EE, Google AppEngine, OSGi, GWT, Android) and offers numerous extensions to fit the needs of all developers.
From my knowledge, it is the first RESTful web framework for Java. It’s also funny how so many companies are using this framework, but you’ll never know it. Like it’s almost ‘invisible’.
- Enterprise framework
- Available for Java SE, Java EE, Google Web Toolkit, Google AppEngine, Android, OSGi environments
- vanilla JAX-RS supported (just like Jersey)
- Offers most advanced RESTful support
- HTTP, HTTPS, SMTP, XML, JSON, Atom, and WADL
- Other libraries are also supported
- Still under active development
- Smart url binding and full URI routing
- Available books
- Very steep learning curve
- Closed community, though openly active at StackOverflow
- Not that popular these days, mostly thanks to Play Framework and Jersey
Somehow this framework is still very popular, considering its age and current competition. I can’t give it 5/5 stars because of its complexity but if you have time give it a chance, especially if you need low-level RESTful access.