Pages

Men

rh

4/24/2013

Fundamental Characteristics / Constraints of REST

Client Server
Separation of Concerns is a principle where the user interface is separated from data storage. This leads to the portability of the user interface across multiple platforms and improves scalability by simplifying server components.

Stateless

Each request to the server should contain all the information required to understand and complete the request.

Cacheable

The data within a response to a request should be cacheable/ non-cacheable to be used by client at another point of time. This might improve the performance and reduce network traffic.

Layered System

Intermediary servers like Proxy servers or Cache servers can be used to improve performance or introduce security.

Uniform Interface

A uniform interface (like HTTP GET, POST, DELETE, PUT) is to be used to access a resource.
A RESTful Web Service is a collection of the following:

URI

Uniform Resource Identifier - This is a unique way of identifying resources on the network. Every resource on the web is given a unique identifier - a universal identifier (example, URL). All web browsers, servers, applications understand this identifier, which makes it easy to connect and exchange information between one another without any issues.

MIME Type

Can be XML, HTML, and JSON.

HTTP Methods

HTTP forms a standard way to communicate with resources on the web. GET, PUT, DELETE, POST are some of the common methods to access a resource.

GET

Helps to request a specific representation of the resource.

PUT

Updates a resource with a specific representation.

DELETE

Deletes a specified resource.

POST

Creates a new resource.

Source Collected from Code Project



No comments :

Post a Comment