1. REST (Representational State Transfer)
    1. Properties of a RESTful Application
      1. Client-Server
      2. Stateless
      3. Cache
      4. Uniform Interface
      5. Layered System
      6. Code-On-Demand
      7. Overview

REST (Representational State Transfer)

REST (Representational State Transfer) is a networked, client-server application architecture that allows operations on resources. It is the formal definition that underlies the World Wide Web and influences the design of Web technology including HTTP, the URI, and HTML.

It is one of several networked application architectures defined in a Ph.D. dissertation by Roy T. Fielding, an editor on the HTTP specification.

REST is often used to describe a property of API designs, this is called a RESTful API. REST more accurately describes how Web browsers and Web servers work together.

Properties of a RESTful Application

When an application architecture adds a constraint, it also gains useful features since other parts of the applications may make useful assumptions about how the application will behave.

For example, a constraint of the Web is that a GET request is "safe" and does not change the state of the application (in a visible way). The benefit of this is that users may make GET requests without worrying they may change the state of the server.

REST is an application architecture of six such constraints:

Client-Server

A client-server architecture is one of the key constraints that enforces separation of concerns. A single server retains data, and a client presents the interface around interacting with the data. The client is portable, and may be physically or logically separate from the server.

Stateless

All communication must be stateless—each request must carry all the information necessary to process the request.

Cache

Caching allows for better network efficiency, by allowing servers to communicate when a resource from a previous request may be re-used in the future. For individual nodes, it is a feature.

Uniform Interface

The uniform interface means that a generic user agent is able to make use of the data on any server, without any prior knowledge of what the server does or how it operates.

Layered System

A layered system allows an application to be composed of multiple, hierarchical layers of nodes, for example caches, gateways, delivery networks, or proxies.

Code-On-Demand

Code-on-demand allows servers to ship a program that clients may run to make additional use of the data in a response. For individual nodes, it is a feature. Servers and clients may or may not decide to use code-on-demand.

Overview