Subscribe to feed:
Or get posts via email:









Add to Technorati Favorites



« Use Tag Files For Modularity in JSP | Main | I've been Rubhubbed! »

Representational State Transfer (REST)

REST (REpresentational State Transfer) describes an architecture style for networked systems. It also happens to be the underlying architectural model of the Web. Roy Fielding coined the term in his PhD dissertation.

The basic characteristics of a REST system are:

  1. Client (browser) and server
  2. Stateless Interactions
  3. Cacheable Resources (using Meta info)
  4. A uniform interface (HTTP)
  5. Named resources (URIs)
  6. Interconnected resource Representations (a href)

So, the web is already a RESTian system. The parenthetical information after each item in the above list shows how the current Web satisfies that design principle.

The idea of making a RESTian system is to see it as a data resource manipulation problem. To sum up the REST Best Practices from a presentation by Roger L. Costello:

  1. Expose a URI for each resource
  2. Use logical URIs (not physical)
  3. Use nouns in the URIs (not verbs)
  4. Use the / in URIs to represent parent/child relationship
  5. Minimize use of query strings
  6. use GET for resource representations (not POST)
  7. Make all HTTP GET requests side-effect free
  8. Include links in responses, gradually unfolding information.

Strong proponents of REST such as Mark Baker purport that it is a natural tendency for document oriented systems, because documents are in fact state.

From an article by Paul Prescod:

The best part about REST is that it frees you from waiting for standards like SOAP and WSDL to mature. You do not need them. You can do REST today, using W3C and IETF standards that range in age from 10 years (URIs) to 3 years (HTTP 1.1).

Post a comment