Are you are a restafarian?

REST (REpresentational State Transfer) is an arquitectural style for web services design based on the natural behavior of web applications, when the user progresses through an application by selecting links and sending forms to update resources.

Since REST is intended to be inside the boundaries of the HTTP protocol, is defined as a list of constraints to the general web architecture:

Client-server

Separating the user interface from the processing and storage concerns allows portability of the client components across different platforms, and simplifies scalability of the server part. Also, it allows the client and server components to evolve independently.

Stateless

Communication must be stateless. Every request from client to server must contain all the information necessary to understand the request. It implies that all the session state must be kept entirely on the client. This improves the system visibility, reliability, and scalability.

Uniform interface

This is probably the most important constraint in this list. Implementations are decoupled from the services they provide, which encourages independent evolvability. The four guiding principles of this interface are: representation of resources, manipulation of resources through these representations, self-descriptive messages and hypermedia as the engine of application state (also known as HATEOAS).

Cacheable

Clients can cache responses. Responses must therefore, implicitly or explicitly, define themselves as cacheable, or not, to prevent clients reusing stale or inappropriate data in response to further requests. Caching partially or completely eliminates some client–server interactions, further improving scalability and performance.

Layered system

A client cannot ordinarily tell whether it is connected directly to the end server, or to an intermediary along the way. Intermediary servers may improve system scalability by enabling load-balancing and by providing shared caches. They may also enforce security policies.

Code on demand (optional)

REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. This simplifies clients by reducing the number of features required to be pre-implemented. Allowing features to be downloaded after deployment improves system extensibility.

results matching ""

    No results matching ""