RESTful web services

REST is an architectural style for managing the state information. REST specifies the uniform interface, and when applied to the services makes them interoperable over the web. The RESTful architecture is based on HTTP 1.1 and aims to make best use of the HTTP (Hyper Text Transfer Protocol). The REST style is used mostly for web-based applications. It provides an easy way to exchange data, irrespective of the underlying platform of the services.

REST is a style, not a standard. REST embraces the ideas of HTTP, as well as defining the best way to use HTTP protocol to build distributed systems. REST is very intuitive in nature and embraces simplicity in its system architecture style when applied.

REST builds on top of HTTP protocol and derives HTTP verbs, such as request methods, headers, status code, request-response models, negotiation for data to be represented (content negotiation), and so on. This enforces the stateless distribution mechanism for developing interoperable systems.

These are the REST service principles:

  • It should be stateless.
  • It should access all the resources from the server using a Uniform Resource Identifier (URI).
  • It does not have inbuilt encryption.
  • It does not have sessions.
  • It uses HTTP protocol.
  • For performing CRUD operations, it should use HTTP verbs such as GET, POST, PUT, and DELETE.
  • It should return the result only in the standard data exchange form, such as JSON or XML, BSON, atom, or Open Data Protocol (OData).
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset