Geeks With Blogs
My blog on all kinds of stuff...

REST touts that a "progresses through an application by selecting links (state transitions) resulting in the next page....

To borrow from a commonly used example, if I have a web service that "gets a list of parts", the URI to get the parts would look like this: and the "response" contains a list of links to the individual parts like this: <Part id="00345" xlink:href=""/>

For additional information, I would have to "select" the link to "GET" information on the part.

What consumer application really wants to iterate through a list of links to get part detail information (other than a user interface)? 

The Astoria samples are more liberal and actually return detail information for each product that exists (a URI is included also):

<DataService xml:base="http://host/vdir/northwind.svc">
 <Product uri="Products[1]">
   <QuantityPerUnit>10 boxes x 20 bags</QuantityPerUnit>
   <UnitsInStock />
   <ProductCategory href="Products[1]/ProductCategory" />
   <Supplier href="Products[1]/Supplier" />
 <Product uri="Products[2]">
   <QuantityPerUnit>24 - 12 oz bottles</QuantityPerUnit>
   <ProductCategory href="Products[2]/ProductCategory" />
  <Supplier href="Products[2]/Supplier" />
  <!-- more products ... -->

This just seems wrong to me and state transitioning seems to be shot.  In other words, I think it becomes less about REST and more about HTTP and data formats.  Maybe it's hi-REST versus low-REST?

Posted on Tuesday, May 1, 2007 10:07 AM Design , Architecture | Back to top

Comments on this post: REST -only links or no?

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

Copyright © Ebenezer Ikonne | Powered by: