Geeks With Blogs
Subodh Pushpak Technical musings on Win8, mobile (iOS / android / WP7) and WCF

REST

REST strictly refers to a collection of network architecture principles which outline how resources are defined and addressed. The term is often used in a looser sense to describe any simple interface which transmits domain-specific data over HTTP without an additional messaging layer such as SOAP or session tracking via HTTP cookies.

REST Principles:

  • Application state and functionality are divided into resources
  • Every resource is uniquely addressable using a universal syntax for use in hypermedia links
  • All resources share a uniform interface for the transfer of state between client and resource, consisting of
    • A constrained set of well-defined operations
    • A constrained set of content types, optionally supporting code on demand
  • A protocol which is:
    • Client-server
    • Stateless
    • Cacheable
    • Layered

REST:

  • Provides improved response times and server loading characteristics due to support for caching
  • Improves server scalability by reducing the need to maintain communication state. This means that different servers can be used to handle initial and subsequent requests
  • Requires less client-side software to be written than other approaches, because a single browser can access any application and any resource
  • Depends less on vendor software than mechanisms which layer additional messaging frameworks on top of HTTP
  • Provides equivalent functionality when compared to alternative approaches to communication
  • Does not require a separate resource discovery mechanism, due to the use of hyperlinks in content
  • Provides better long-term compatibility and evolvability characteristics than RPC. This is due to:
    • The capability of document types such as HTML to evolve without breaking backwards- or forwards-compatibility, and
    • The ability of resources to add support for new content types as they are defined without dropping or reducing support for older content types.

    Various websites and web applications offer REST-like developer interfaces to data (e.g. Flickr or Amazon S3).

Difference between POX/HTTP, SOAP, and REST....

  • REST is an architectural style that is independent, but compatible, with XML. It’s about identifiable resources, resource representations, a fixed (uniform) interface, and linking. HTTP is REST’s most popular instantiation.

  • POX/HTTP means exchanging plain old XML documents over HTTP. RESTful POX, i.e. using XML in a RESTful manner, would mean POX is a subset of REST. Many, if not most POX applications don’t care about REST very much, though — they’d thus be part of a distinct set of applications.

  • SOAP is a standard document format for building high-level protocols. Anything that uses SOAP is (by definition) not just using plain old XML, and thus not POX; it may be RESTful, unless it violates REST principles.

For best explanations visit http://tomayko.com/writings/rest-to-my-wife.

Blogged with the Flock Browser
Posted on Friday, September 18, 2009 6:07 PM | Back to top


Comments on this post: REST - Representational State Transfer

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © subodhnpushpak | Powered by: GeeksWithBlogs.net | Join free