Java Reference
In-Depth Information
Another key concept is Hypermedia as the Engine of Application State, which has the
simply say “
hypermedia
”
instead.
5
Often known, believe it or not, as RESTafarians.
The principles defined in this section are architectural and are thus independent of imple-
ded to implement RESTful services, JAX-RS.
6
Sorry.
9.2. The Java approach: JAX-RS
The Java EE specification includes the Java API for RESTful Services. Version 1.18 is
from JSR 311. The new version, 2.0, is an implementation of JSR 339 and was released in
May of 2013.
partdoesn'tdependonthis,soI'lldiscussthatseparately.I'llstart withthebasic infrastruc-
ture and then move to REST.
7
Yes, that's a URL-driven database, and yes, that violates hypermedia principles. I promise to get to that later.
What do Java developers actually use for REST?
In this topic I normally start with what Java developers use for a particular problem, then
show how Groovy can help the Java implementations, and finally discuss what Groovy of-
fers as an alternative. When I describe what Java developers typically use, I default to what
the Java SE or EE specification provides.
That's not the case with REST. In addition to the spec, JAX-RS, Java developers use
several third-party alternatives. Among the most popular are Restlet (
http://restlet.org/
)
,
RestEasy (
www.jboss.org/resteasy
)
, and Restfulie (
http://restfulie.caelum.com.br/
)
, and