Friday 21 August 2015

REST Architecture : Scrammed explanation

If you want to take a glance @ Rest architecture , following is a brief definition with constraints.

Rest is an Architectural design pattern and not a standard or design methodology.

Roy Fielding is the person who defines REST as follows (~70's)
"Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: a network of web pages (a virtual state-machine), where the user progresses through an application by selecting links (state transitions), resulting in the next page (representing the next state of the application) being transferred to the user and rendered for their use."

Simply , a web page represent a state and by clicking a hyperlink you can do the state transfer into a different page.

Following are the Architectural Constraints of REST.

  1. Uniform Interface : Each call is Independent
  2. Statelessness : State is never managed in the server. 
  3. Client-Server : Highly decoupled
  4. Cacheable : Each response must define itself as cacheable or not
  5. Layered System : Client is not sure about the direct connection to the server   
  6. Code on Demand : Server can customize the client functionality without re-writing 
HATEOAS is a terminology that goes with REST. following is the acronym. 

"Hypermedia as the Engine of Application State"

Hypermedia  is a generalization of hypertext along with other media types. This also describes that the API is Self-documenting, very dynamic . ie : Allows changes to API without having to rewrite the client. 

No comments:

Post a Comment