Java Reference
In-Depth Information
Summary
The JAX-RS specification is slated to be included in Java EE 6, so it's not only a fun and easy
API to use, but an important one as well. REST has gained significant popularity recently, and
it will be interesting to see what impact on the world of web services JAX-RS will have in the
future.
That having been said, JAX-RS != REST. The Atom Publishing Protocol != REST. These are
useful frameworks for making lightweight web applications. They are covered in this chapter
because they are important starting points for Java developers, and can certainly be used to
create RESTful applications. Just don't fall into the trap of thinking that because you're using
Jersey you're doing REST.
When designing a RESTful application, which you can do (or fail to do) with these frame-
works, keep this in mind above all else: hypermediaastheengineofapplicationstate. Your
application is a state machine, with every response containing the means to transition to any
next possible state. This does three important things: it allows your applications to scale be-
cause state is not kept on the server; it frees the client from relying on out-of-band negoti-
ations (as is the case with WSDL client code generation); and it allows the server to change
the shape of URIs (other than the root) as it sees fit, which gives your infrastructure team some
real flexibility.
Search WWH ::




Custom Search