Choosing a Library to Build a REST API in Java
Java library for restful API, tech stack choices for building REST API in Java.
Join the DZone community and get the full member experience.Join For Free
API is not a new concept in software engineering. In fact, SOAP was invented in 1998 which was very popular back then, it is still used today in large enterprise software. Representational State Transfer (REST) was proposed by Roy Fielding in 2000. Which became very popular due to its simplicity and in the last decade the adoption of RESTful API was tremendously seen in existing enterprise software as well as new software developed.
While building RESTful API in java, we have many frameworks and libraries to choose from. In this article, we will quickly cover some of the questions that one needs to ask before building RESTful API in java.
Important Questions To Start With
- Do we want JAX-RS compliant implementation?
- Do we have any preference for the Application Server?
- How the ecosystem looks like do we need any framework support?
Choose something that is JAX-RS Compliant then we have choices like
Some of the non-JAX-RS Compliant options are
Apache CXF and SpringBoot are more than just libraries they provide a lot of tooling and production-ready features which are essential for rapid development and operational aspect of API.
It is also worth mentioning that the target server environment plays a crucial role. Even though many libraries are designed to be portable in any Java environment but in reality choosing the right library makes the job easy especially when it comes to maintaining the libraries.
Opinions expressed by DZone contributors are their own.