I have a requirement for RESTFul webservices. It is up to my team to decide whether to go with Jersey or Restlet or RESTEasy or anything else. after omitting other frameworks, we are not able to choose between RESTEasy and Jersey.
Since both of them seem to be almost the same, what should we consider?
The client API should be simple and rich. We are already using JBoss 5.1 in production.
Please let me know the pros and cons of Jersey and RESTEasy. Except that it is from JBoss, I'm not able to find any valid point over Jersey.
Both Jersey and RESTEasy provide their own implementation. The difference is that Jersey additionally provides something called Chunked Output. It allows the server to send back to the client a response in parts (chunks).
Jersey is Sun's production quality reference implementation for JSR 311: JAX-RS: The Java API for RESTful Web Services. Jersey implements support for the annotations defined in JSR-311, making it easy for developers to build RESTful web services with Java and the Java JVM.
Overview. JAX-RS, JSR-311, is a new JCP specification that provides a Java API for RESTful Web Services over the HTTP protocol. Resteasy is an portable implementation of this specification which can run in any Servlet container.
JAX-RS is an specification (just a definition) and Jersey is a JAX-RS implementation. Jersey framework is more than the JAX-RS Reference Implementation. Jersey provides its own API that extend the JAX-RS toolkit with additional features and utilities to further simplify RESTful service and client development.
One nice value-add feature of Jersey is the Jersey Test Framework which lets you run and test your Jersey REST services inside JUnit, without the need to first deploy them to a stand-alone server and even before you commit your code to your repo.
These tests are easy to write, you can run them before you even check in your Jersey web service code to make sure your service is working, and they become part of your automated test suite which helps enforce the contract your services have with your clients.
See this article for more information if you're using Jersety 1.X or this one for 2.x.
Another nice feature is support for the REST MVC pattern, which would allow you to return a View from your Jersey services rather than just data (the Model). Compatibility with the Jersey Test Framework is still maturing in this regard, but it is workable.
See this article for more information on that:
http://usna86-techbits.blogspot.com/2013/12/jersey-jerseytest-migration-from-1x-to.html
I think the REST API & the implementation is almost like a very vanilla features. So both works the same way. But one major difference is in RESTEasy it is very difficult to generate the WADL API.Especially when the customers want to check the REST APi calls., the WADL will help a lot like WSDL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With