What is REST?
Andy Balaam
artificialworlds.net/blog
Contents
It's not SOAP
Resources
Identifiers
Methods
Principles
Advantages and Limitations
More Info
It's not SOAP
Everyone hates SOAP. Why?
Complex URLs
Complex tag names, namespaces etc.
Complex interactions, multiple requests
Every SOAP interface is different
Resources
Everything is a resource
You can only get, edit, add and delete resources
There are no "commands"
Resources are in collections
Identifiers
Unique identifier per resource
E.g. http://example.com/poems/a-question
Collections have identifiers too
E.g. http://example.com/poems
Methods
GET - fetch a representation of a resource
(NOTHING IS CHANGED)
PUT - overwrite or create a resource
(REPEATING HAS NO EFFECT)
POST - add a new resource
DELETE - remove a resource
(REPEATING HAS NO EFFECT)
Principles
All about resources
Stateless - requests are independent
Self-describing, hyperlinked
Cacheable
Layerable (proxies, gateways, firewalls)
Advantages
Simple
Scalable
General
Independent layers
Visible
Limitations
It's not RPC
No operations, just resources
More info
Videos
youtube.com/user/ajbalaam
Twitter
@andybalaam
Blog
artificialworlds.net/blog
Projects
artificialworlds.net