Rest (Representational State Transfer) is a standard set of rules to be followed by developer to develop API.
Six conditions that need to be met to become an Rest API
Cacheable - never having to generate same response twice
Statelessness - Not storing any information about HTTP Requests. Treating each request as new.
Client Server - Client and server must evolve separately. No dependency between each other
Uniform Interface - It simplifies and decouples the architecture, which enables each part to evlove independently
Layered System - Each layer doesn't know anything about any layer other than that of immediate layer
Code on Demand - Server may also contains code , i.e.., java applet, client script
HTTP Methods
- GET: Retrieves one or more resources .
- POST: Create a resource
- PUT: Create new resource or Update an existing resource .It is idempotent. Do it as many times as you like, and the result is the same
- DELETE: Delete an existing resource
- PATCH: Update part of the resource
REST is an architectural style not protocol.
REST is Language and Platform independent.
REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
REST uses URI to expose business logic
REST does not define too much standards like SOAP.
REST requires less bandwidth and resource
RESTful web services inherits security measures from the underlying transport.
REST permits different data format such as Plain text, HTML, XML, JSON etc.
No comments:
Post a Comment