Java Reference
In-Depth Information
Fielding's assertion is that since 1994, “the REST architectural style has been used to guide
the design and development of the architecture of the modern Web” (page 107). This is im-
portant to understand: REST is not, as the popular imagination might have it, a different way
of doing web services that appeals more to the kind of people who prefer PHP and Rails to
.NET and Java. REST doesn't build on the principles of the Web—the Web was built based on
RESTful principles. They just weren't so named until a few years later. The idea of REST is
essentially a reverse-engineering of how the Web works. HTTP itself, and URIs themselves,
are written with REST principles.
REST is very important in the modern services landscape, its popularity is growing, and it
is often radically misunderstood. It seems that the popular imagination has taken hold of the
idea of REST as POX over HTTP, or any web services that are not SOAP with WS-*. Such
designs are popular and abundant, and may have many laudable qualities, but they are notan
embodiment of REST just because they aren't SOAP.
This chapter is not here to tell you how theoretically pure your REST implementations must
be. But it is important to outline what REST really is, so that you can implement your services
with clarity. There are some interesting convenience frameworks available, such as JSR 311,
and we'll work with that framework a lot in this chapter. I've tried to keep examples short and
to the point, but they still can get rather long given all of the moving parts. Remember that
you have to balance the little local code solution with the general overarching principles that
make a sound RESTful architecture.
NOTE
Industry analysts have recently coined the term WOA, or Web Oriented Architecture. This is typically
used to refer to something like a SOA-lite, or a service architecture that uses XML, JSON (JavaScript
Object Notation), and HTTP. The term is generally intended to imply two things: an architecture that
1) does not use WS-* specifications and 2) is an application of RESTful principles that is much looser
than Fielding's dissertation actually allows (you can use cookies, etc.).
So let's try to examine, beyond the considerable noise, what REST really is.
The Principles of REST
REST is an acronym for REpresentational State Transfer. Because it is an architectural style,
there's room for variety in how certain constraints are understood. What follows are the basic
points that distinguish REST, as Fielding stated in Chapter 5 of his dissertation.
Search WWH ::




Custom Search