The REST architectural style was developed by W3C Technical Architecture Group (TAG) in parallel with HTTP 1.1, based on the existing design of HTTP 1.0. The World Wide Web represents the largest implementation of a system conforming to the REST architectural style.
REST-style architectures conventionally consist of clients and servers. Clients initiate requests to servers; servers process requests and return appropriate responses. Requests and responses are built around the transfer of representations of resources. A resource can be any body of information, static or variable. A representation of a resource is typically a document that captures the current or intended state of a resource.
The client begins sending requests when it is ready to make the transition to a new state. While one or more requests are outstanding, the client is considered to be in transition. The representation of each application state contains links that may be used the next time the client chooses to initiate a new state-transition.
The design goals of the REST architectural style are:
- Scalability of component interactions
- Simplicity of interfaces
- Modifiability of components to meet changing needs (even while the application is running)
- Visibility of communication between components by service agents
- Portability of component deployment
REST has been applied to describe the desired web architecture, to help identify existing problems, to compare alternative solutions, and to ensure that protocol extensions would not violate the core constraints that make the Web successful.
In addition to URIs; Internet media types; request and response codes; etc., HTTP has a vocabulary of operations called request methods, most notably:
- GET (retrieve)
- POST (create)
- PUT (modify)
- DELETE (delete)
The Daisycon API uses these request methods for retrieving, creating, modifying and deleting store data. Check out Wikipedia for further information about REST.
JSON’s simplicity has made it a favored data exchange format for several other agile languages as well. JSON is easier to parse than XML and its structure is much lighter.