Welcome to my second part of “Types of Web Service – REST”, REST stands for Representational State Transfer. It is the most popular and adapted web service development method in today’s IT world. Like I mentioned in my previous post “Types of Web Services – SOAP Introduction”, SOAP is the standard. REST is not a standard nor a process, it’s an architecture style of Application Programming Interface. You will find many posts mentioning it as a Software Architecture Style of the World Wide Web.
Roy Fielding is the person who introduced and defined the term Representational State Transfer somewhere during 2000. REST follows the principle used by largest distributed application, i.e. WWW. It uses HTTP protocol in almost all cases, it is stateless, cache-able communication protocol, based on client-server architecture. In earlier days CORBA, SOAP, and RPC is used for connecting the different machines. To overcome the disadvantages of these systems, the organization started relying on REST architecture, which uses simple HTTP call to establish the connection in between the machines.
• Every component of REST architecture is the resource.
• All these resources can be identified by a URI.
• All the resources are handled using HTTP methods like GET, PUT, POST, DELETE.
• All this HTTP method are similar to Read, Create, update and Delete operations.
• REST is a stateless service. Each request is considered as an independent request.
• Request carries all the necessary information which is required to understand the request.
• XML or JSON is used for communications purpose.
• REST reduces the dependency on middleware.
• REST is not a protocol or standard, so it gives freedom to develop the web service the way you want to implement it.
• We get lightweight services, as REST uses JSON to transfer the data.
• Learning curve of REST is easy than SOAP.
• Flexibility to get the response in Like XML or JSON.