REST Principles

REST is a set of principles that define how Web standards, such as HTTP and URIs, are supposed to be used.

There are five important REST principle as mentioned below –

  • Addressable Resources – Everything is a resource, each resource should be identified by a URI (unique identifier)
  • Simple and Uniform Interfaces – REST is based on HTTP protocol so use HTTP GET, POST, PUT and DELETE method to perform actions. This make REST simple and uniform.
  • Representation Oriented- Communication are done by representation. Representation of resources are exchanged. GET is used to return a representation and PUT, POST passes representation to the server so that underlying resources may change. Representation may be in many formats like XML, JSON etc.
  • Communicate Stateless – An application may has state but there is no client session data stored on the server. Any session specific data should be held and maintained by the client and transferred to the server with each request as needed.
  • Cacheable – Clients should be able to cache the responses for further use.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s