6 Powerful Frameworks for creating RESTful services in Java

Representational State Transfer (REST) is a software architecture style consisting of guidelines and best practices for creating scalable web services. Here is a list of best Frameworks specifically for creating RESTful services in Java.

1) Dropwizard

Dropwizard is a Java framework for developing ops-friendly, high-performance, RESTful web services. Dropwizard is a opinionated framework for setting up modern web applications, includes Jetty, Jackson, Jersey and Metrics. Developed by Yammer to power their JVM-based backend services, Dropwizard pulls together stable, mature libraries from the Java ecosystem into a simple, light-weight package that lets you focus on getting things done. Dropwizard has out-of-the-box support for sophisticated configuration, application metrics, logging, operational tools, and much more, allowing you and your team to ship a production-quality HTTP+JSON web service in the shortest time possible.

It uses :
  • Jetty for HTTP
  • Jersey for REST
  • Jackson for JSON
  • Metrics for metrics
  • Others : Logback and slf4j, Guava, Hibernate Validator

Tutorials on Dropwizard

2) Jersey

Jersey is a JAX-RS reference implementation.

It is quite easy to create/deploy a RESTful service using either of them. I find the documentation was adequate to start up. Jersey RESTful Web Services framework is an open source, production quality, framework for developing RESTful Web Services in Java that provides support for JAX-RS APIs and serves as a JAX-RS (JSR 311 & JSR 339) Reference Implementation.

Goals of Jersey project can be summarized in the following points:
  • Track the JAX-RS API and provide regular releases of production quality Reference Implementations that ships with GlassFish;
  • Provide APIs to extend Jersey & Build a community of users and developers; and finally
  • Make it easy to build RESTful Web services utilising Java and the Java Virtual Machine.
Tutorials on Jersey

3) RESTEasy

RESTEasy is a fully certified and portable implementation of the JAX-RS specification which provides a Java API for RESTful Web Services over the HTTP protocol.  RESTEasy is a JBoss project that provides various frameworks to help you build RESTful Web Services and RESTful Java applications. JAX-RS is a new JCP specification that provides a Java API for RESTful Web Services over the HTTP protocol.

Tutorials on RESTEasy

4) Retrofit

Retrofit is a type-safe REST client for Java. Simply put, Retrofit is a library that will let you define your API in a simple Java interface and will automagically convert it into a full-blown REST client. If you want more information on what you can do with Retrofit, you can check out their website (Retrofit Website).

Tutorials on Retrofit

5) Spark

Spark is a micro-framework based on Sinatra but written entirely in Java. It is a simple and lightweight Java web framework built for rapid development. Spark's intention isn't to compete with Sinatra, or the dozen of similar web frameworks in different languages, but to provide a pure Java alternative for developers that want to, or are required to, develop in Java.
Spark focuses on being as simple and straight-forward as possible, without the need for cumbersome (XML) configuration, to enable very fast web application development in pure Java with minimal effort. It’s a totally different paradigm when compared to the overuse of annotations for accomplishing pretty trivial stuff seen in other web frameworks, for example, JAX-RS implementations.

Tutorials on Spark

6) Swagger 

Swagger is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services. Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability.

Tutorials on Swagger

There might be other powerful Java REST frameworks too. You can share your experience in the comments section below. I would definitely like to add them to my list.


programming 2697834917040948615

Post a comment



Recent Posts


Join Us