Presentation about RESTful Services with Spring 3
I just watched this excellent presentation by Arjen Poutsma: Implementing REST Web application Arquitectures
Arjen Poutsma talks basically about:
- The URI template
The structure of a Unified Resource Identifier to request a resource:
- How to use Spring 3 Annotations to handle the four HTTP methods
– GET is used to retrieve a resource and it is safe
– PUT is used to update or create a resource in a known location. It is an idempotent operation, it always returns the same result.
– POST is used to create a resource when the location is unknown. It is not idempotent.
– DELETE is used to delete a resource and it is idempotent.
- Content negotiation
This allows to select a different view according to the extension of the resource or the request header content type. Example, if the extension is .html, it returns an html view; if the extension is .pdf, it returns a pdf view, etc.
This is a label inserted in the response header used by proxies to find out when a resource has been modified. It is calculated from the content body, so if this changes, the Etag changes too and the proxy knows that it has to retrieve and cache the resource again instead of returning the cached version.
Client-side tools to work with RESTful services. There is a demo using Flickr RESTful service.