RESTful architecture constraints
What is REST
REST or Representational State Transfer, is an architectural style for API interactions over HTTP. It is an application-level standard for the communication between the client and the server and is characterized by statelessness and clear client-server separation of concerns.
1. Client - server model
- Seperate of concerns
- client and server don't share any code
Uniform interface
Client and server share a common technical interface
Interface:
- Contract for communication between client-server
- Contract has no business context
There are 5 guilding principles
- Indentify of the resource (URI/URL)
- Representation of the resource: XML, JSON, TXT
- Self descriptive message -metadata, http headers
State management
- No state management in mid tier/server
- All calls from client are independent
Caching
Actions for business domain booking vacation
API status code
]