alexcuesta

My tech blog

Presentation about RESTful Services with Spring 3

leave a comment »

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:
    [scheme:][//authority][path][?query][#fragment]
  • 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.
  • Etags
    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.
  • RestTemplates
    Client-side tools to work with RESTful services. There is a demo using Flickr RESTful service.

Written by alexcuesta

January 5, 2010 at 9:51 pm

Posted in Java

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: