Tuesday, November 18, 2008

REST of SOA

Another more general session, this one highlighting the differences between REST and Web Services and when REST is the preferred technology.



REST – interaction
Web Services – Transactions

Stateless – all state is pushed down to client
REST doesn’t have to be XML, it can be anything mapped to a MIME type

GET – should not change state – possible cacheable
POST – insert/update – not a straightforward replacement
PUT – update – replaces the original data
DELETE – self explanatory

Do a redirect to GET after a POST to ensure that the data was actually changed

State is the resource you have been provided and the resources you can access from it

The client owns the state, not the server

No comments: