WhatIsREST.com
REST Constraints
REST constraints are design rules that are applied to establish the distinct characteristics of the REST architectural style.
The formal REST constraints are:
- Client-Server
- Stateless
- Cache
- Interface / Uniform Contract
- Layered System
- Code-On-Demand
Each constraint is a pre-determined design decision that can have both positive and negative impacts. The intent is for the positives of each constraint to balance out the negatives to produce an overall architecture that resembles the Web.
An architecture that weakens or eliminates a required REST constraint is generally considered to no longer conform to REST. This requires that educated decisions be made to understand the potential trade-offs when deliberately deviating from the application of REST constraints.
REST Constraints Reference
This section provides profile tables for the five REST constraints. Every profile table contains the following sections:
- Short Definition - A concise, single-statement definition that establishes the fundamental purpose of the constraint.
- Long Definition - A longer description of the constraint that provides more detail as to what it is intended to accomplish.
- Application - A list of common steps and requirements for applying the constraint.
- Impacts - A list of positive and negative impacts that can result from the application of the constraint.
- Relationship to REST - A brief explanation of how the constraint can relate to other constraints and overall REST architecture.
- Related REST Goals - A list of REST design goals that are related to and relevant to the application of this constraint.
Each profile table is followed by a Related Excerpts from Fielding's Dissertation section that provides relevant excerpts from Roy Fielding's "Architectural Styles and the Design of Network-based Software Architectures" for reference purposes.
Note that the upcoming constraint profiles have been authored using language and terminology compatible with this Website. You may notice different terminology being used in the aforementioned excerpts. For example, Fielding's references to interface or uniform interface correspond to the term uniform contract on this Website. This and other vocabulary differences were explained earlier.