Java Reference
In-Depth Information
Representation
A representation is an immutable, self-descriptive, stateless snapshot of a resource, which
may contain links to other resources.
The most common representations are XML and JSON, with JSON becoming almost ubi-
quitous.
The Richardson maturity model: a rigged demo
The Richardson Maturity Model (RMM) is based on a 2008 presentation made by Leonard
Richardson, who described multiple levels of REST adoption.
RMM has four levels, numbered from zero to three:
Level 0: Plain old XML (POX) over HTTP— HTTP is merely a transport pro-
tocol, and the service is essentially remote procedure calls using it. Sounds a lot
like SOAP, doesn't it? That's no accident.
Level 1: Addressable resources— EachURIcorrespondstoaresourceontheserv-
er side.
Level 2: Uniform interface— The API utilizes only the HTTP verbs GET, PUT,
POST, and DELETE (plus maybe OPTIONS and TRACE).
Level 3: Hypermedia— The representation of the response contains links defining
additional steps in the process. The server may even define custom MIME types to
specify how the additional metadata is included.
Now, honestly, I have no objections to this model. It's fundamental to Roy Fielding's thesis
to include all of it; you're not really adopting REST unless you have hypermedia, too.
The word maturity , however, carries a lot of emotional baggage. Who wants their imple-
mentation to be less mature? It also can't be a coincidence that SOAP is considered matur-
itylevel0.Themodelisfine,butthere'snoneedtoloaditdownwithjudgmental overtones
that make it feel like a rigged demo.
Search WWH ::




Custom Search