REST

Representational State Transfer or REST is a style of architecture in software and has been very popular in recent times. It allows developers to define web services which could accessed using URI (Uniform Resource Identifiers) and some standard verbs such as GET, PUT, DELETE, POST.

This is a stateless implementation of web services where server doesn’t maintain the state of the operations. However, client can retain the state through the session and same could be passed on by the server to other components, if required. The clients request the URL along with the operation and server sends out the response using a standard and well-defined format.

The client requests each resource using URI and represents the action required on the resource using standard verbs. This results in moving the action from URL to HTTP request method. The response could be XML, JSON or any other defined format.

REST
REST – Source – https://www.slideshare.net/david.krmpotic/rest-david-krmpotic

Characteristics of REST:

  • Client – Server Architecture
  • Statelessness
  • Cacheability
  • Layered System
  • Uniform Interface

Another popular choice in this category is SOAP (Simple Object Access Protocol) which is dependent on XML for request and response. Such protocol turns out to be heavy for several applications and in those cases REST is a right choice. SOAP provides built-in error handling, which makes life easy for developers. REST does not have any defined standard and hence there is no well defined way for built-in error handling. SOAP provides clear definitions of the web service using WSDL (Web Services Description Language), whereas there is no such thing in REST architecture. It is pretty much driven by the implementation team.

Since there is no “official” standard for RESTful web APIs, this is referred as architectural style and not “standard” or “protocol”, unlike SOAP.

Related Keywords

SOAP, Software Architecture

Reference Links:

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.