4. What is REST?
• It’s about communication between computers
• It’s about designing the architecture of your applications
5. It’s about communication between
computers Web services!
oSOAP / XML-RPC => communication
oREST => communication + standardisation
6. It’s about architecturing your
application
• Thesis by Roy Fielding (2000) “Architectural Styles and
the Design of Network-based Software Architectures”
• REST applies some constraints to the architecture of your
application
• interface is the same for humans and computers
7. How does REST work ?
Everything is a “resource”
4 basic requirements for a RESTful system
8. the concept of resource
• Resource = thing exposed by the system to the
outside world
• Everything is a resource
http://www.frailers.net/users/1
http://www.frailers.net/users/1/memberships
• Independent from its representation
user.html =>http://www.frailers.net/users/1
user.jpg => http://www.frailers.net/users/1
9. When is a system RESTful ?
• Addressability
• Statelessness
• Connectivity
• Uniform interface
• 4 standardized actions:
• GET - POST - PUT - DELETE
10.
11.
12. So, why REST ?
• Standardisation is good
• Why use so many different functions when you always do
the same (CRUD’ing objects)
• Why separate the logic for computers and
humans ? (segregation is evil)
• Statelessness => scalability and decoupling