<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: CRUD is not only good for, but is the only consistent way to build REST over HTTP</title>
	<atom:link href="http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http</link>
	<description>Dhananjay Nene's opinions on software programming, design, architecture and the internet</description>
	<lastBuildDate>Sun, 22 Jan 2012 06:53:20 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9151</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Wed, 19 Aug 2009 12:32:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9151</guid>
		<description>M2,

I apologise for being unable to infer which set of my statements you were referring to. I did a quick review and couldn&#039;t find anything which contradicts your litmus test. So a quick note to that effect would be quite helpful.

There was one statement I did make as follows which I wonder was a candidate to cause some confusion.

&lt;blockquote&gt;A POST on say /story/{story_id}/StorySplit would result in a creation of new story with a URI /story/{new_story_id}. The name of the new story will be as was requested in the StorySplit resource&lt;/blockquote&gt;

Just in case that was the issue allow me to clarify that I was requesting a &quot;name&quot; and not an &quot;id&quot; - so I did not know the URI upfront. If not, as I requested, a quick note to clarify what you were referring to would be greatly helpful.</description>
		<content:encoded><![CDATA[<p>M2,</p>
<p>I apologise for being unable to infer which set of my statements you were referring to. I did a quick review and couldn&#8217;t find anything which contradicts your litmus test. So a quick note to that effect would be quite helpful.</p>
<p>There was one statement I did make as follows which I wonder was a candidate to cause some confusion.</p>
<blockquote><p>A POST on say /story/{story_id}/StorySplit would result in a creation of new story with a URI /story/{new_story_id}. The name of the new story will be as was requested in the StorySplit resource</p></blockquote>
<p>Just in case that was the issue allow me to clarify that I was requesting a &#8220;name&#8221; and not an &#8220;id&#8221; &#8211; so I did not know the URI upfront. If not, as I requested, a quick note to clarify what you were referring to would be greatly helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M2</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9150</link>
		<dc:creator>M2</dc:creator>
		<pubDate>Wed, 19 Aug 2009 12:14:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9150</guid>
		<description>I don&#039;t completely agree with your choice of POST in some cases. The litmus test to choose between PUT and POST is idempotence. For idempotent (create or update) requests you should use PUT, otherwise you should use POST! If you want to create a new ressource and you know before sending your request the URI of the resource to be created, then you should use PUT instead of POST. If you don&#039;t know the URI (id) of the new ressource and your request is sent to a factory ressource then it should be a POST. The reasoning is the same for modifying an existing ressource. If your modiifcation is idempotent, it should be an PUT, otherwise it should be a POST (for example your want to append some content to an existing resource).</description>
		<content:encoded><![CDATA[<p>I don&#8217;t completely agree with your choice of POST in some cases. The litmus test to choose between PUT and POST is idempotence. For idempotent (create or update) requests you should use PUT, otherwise you should use POST! If you want to create a new ressource and you know before sending your request the URI of the resource to be created, then you should use PUT instead of POST. If you don&#8217;t know the URI (id) of the new ressource and your request is sent to a factory ressource then it should be a POST. The reasoning is the same for modifying an existing ressource. If your modiifcation is idempotent, it should be an PUT, otherwise it should be a POST (for example your want to append some content to an existing resource).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Martinez Pomares</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9140</link>
		<dc:creator>William Martinez Pomares</dc:creator>
		<pubDate>Mon, 17 Aug 2009 15:29:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9140</guid>
		<description>Yes, Dhananjay, the POST and PUT do say so in the HTTP.
Actually, POST adds: &quot;POST is designed to allow a uniform method to cover the following functions:
      - Annotation of existing resources;
      - Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;
      - Providing a block of data, such as the result of submitting a form, to a data-handling process;
      - Extending a database through an append operation.
The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI&quot;
And it includes a way to identify when to use POST and when PUT. It says in POST, the URI is the target resource that receives the payload entity as a subordinate, while in PUT the URI represents the actual payload entity!

That is why, if you want to replace something, it is PUT. If you want to move something, from the task container to the story container for instance, you can use a POST to the Story URI and the payload can be the Task URI to be moved! That is simple.

Now, about URIs, the are IDs in the form:
(rfc2616, sec 3.2.2)
http_URL = &quot;http:&quot; &quot;//&quot; host [ &quot;:&quot; port ] [ abs_path [ &quot;?&quot; query ]] 
Note that the URL is for identifying resources. So, additional to the path, it may contain a query string to further identify the resource, but nothing more. Any other info like properties, should be managed as metadata using headers. Same for changes metada or actual data, using header or payload. Adding extra things to the URL to denote action, or payload, breaks the idea. This is usually done to simplify the API notation to be completely contained in the URL, but HTTP is far more complex than that.
Sure, I agree with your take on CRUD, just saying be careful!.

Cheers.</description>
		<content:encoded><![CDATA[<p>Yes, Dhananjay, the POST and PUT do say so in the HTTP.<br />
Actually, POST adds: &#8220;POST is designed to allow a uniform method to cover the following functions:<br />
      &#8211; Annotation of existing resources;<br />
      &#8211; Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles;<br />
      &#8211; Providing a block of data, such as the result of submitting a form, to a data-handling process;<br />
      &#8211; Extending a database through an append operation.<br />
The actual function performed by the POST method is determined by the server and is usually dependent on the Request-URI&#8221;<br />
And it includes a way to identify when to use POST and when PUT. It says in POST, the URI is the target resource that receives the payload entity as a subordinate, while in PUT the URI represents the actual payload entity!</p>
<p>That is why, if you want to replace something, it is PUT. If you want to move something, from the task container to the story container for instance, you can use a POST to the Story URI and the payload can be the Task URI to be moved! That is simple.</p>
<p>Now, about URIs, the are IDs in the form:<br />
(rfc2616, sec 3.2.2)<br />
http_URL = &#8220;http:&#8221; &#8220;//&#8221; host [ ":" port ] [ abs_path [ "?" query ]]<br />
Note that the URL is for identifying resources. So, additional to the path, it may contain a query string to further identify the resource, but nothing more. Any other info like properties, should be managed as metadata using headers. Same for changes metada or actual data, using header or payload. Adding extra things to the URL to denote action, or payload, breaks the idea. This is usually done to simplify the API notation to be completely contained in the URL, but HTTP is far more complex than that.<br />
Sure, I agree with your take on CRUD, just saying be careful!.</p>
<p>Cheers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jeff Koftinoff</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9138</link>
		<dc:creator>Jeff Koftinoff</dc:creator>
		<pubDate>Mon, 17 Aug 2009 11:59:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9138</guid>
		<description>Very good post Dhananjay; I agree completely.

While originaly HTTP was originally designed, as you say, with the Uniform Interface constraint, unfortunately it has not stayed so.

In my blog post at: http://www.internetfilter.com/w/articles/http_methods_and_proxies

I list the current complete official and unofficial HTTP methods:

ACL BASELINE-CONTROL BCOPY BDELETE BIND BMOVE BPROPFIND BPROPPATCH CHECKIN CHECKOUT CONNECT COPY DELETE GET HEAD LABEL LINK LOCK MERGE MKACTIVITY MKCALENDAR MKCOL MKREDIRECTREF MKWORKSPACE MOVE NOTIFY OPTIONS ORDERPATCH PATCH POLL POST PROPFIND PROPPATCH PUT REBIND REPORT SEARCH SUBSCRIBE TRACE UNBIND UNCHECKOUT UNLINK UNLOCK UNSUBSCRIBE UPDATE UPDATEREDIRECTREF VERSION-CONTROL X-MS-ENUMATTS 

This makes me sad.  A few like &quot;CONNECT&quot; or &quot;TRACE&quot; are more network oriented so those are fine.  But the group of people who designed these additional HTTP verbs really did not &#039;get&#039; the original intent.  

For instance, why would they need &quot;MKCALENDAR&quot; or &quot;MKACTIVITY&quot; at all when they could just POST it? If people followed in this vein we ought to have &quot;MKBLOG&quot;, &quot;MKBLOGENTRY&quot;, &quot;MKBLOGCOMMENT&quot;, &quot;DELBLOG&quot;, ... Thankfully, we don&#039;t! That&#039;s because we already had everything we need! 

Every function performed by all these HTTP verbs can be boiled down to one of &quot;Create&quot;, &quot;Read&quot;, &quot;Update&quot;, or &quot;Delete&quot;.  Having these other verbs in the protocol make the networking unnecessarily a lot more complex, and this additional complexity makes for more bugs and possible security holes - which is why Javascript is restricted from doing most of the HTTP verbs. 

And as you say, the important thing here is that these operations do not have to be restricted for management of a single low level table at all. Of course one should not become dogmatic about a particular abstraction.

My personal rule of thumb here is &quot;... think more than twice if you think you need other methods. How is it going to be anything other than a Create, Read, Update, or Delete of some resource?&quot;

Regards,
Jeff Koftinoff
www.jdkoftinoff.com</description>
		<content:encoded><![CDATA[<p>Very good post Dhananjay; I agree completely.</p>
<p>While originaly HTTP was originally designed, as you say, with the Uniform Interface constraint, unfortunately it has not stayed so.</p>
<p>In my blog post at: <a href="http://www.internetfilter.com/w/articles/http_methods_and_proxies" rel="nofollow">http://www.internetfilter.com/w/articles/http_methods_and_proxies</a></p>
<p>I list the current complete official and unofficial HTTP methods:</p>
<p>ACL BASELINE-CONTROL BCOPY BDELETE BIND BMOVE BPROPFIND BPROPPATCH CHECKIN CHECKOUT CONNECT COPY DELETE GET HEAD LABEL LINK LOCK MERGE MKACTIVITY MKCALENDAR MKCOL MKREDIRECTREF MKWORKSPACE MOVE NOTIFY OPTIONS ORDERPATCH PATCH POLL POST PROPFIND PROPPATCH PUT REBIND REPORT SEARCH SUBSCRIBE TRACE UNBIND UNCHECKOUT UNLINK UNLOCK UNSUBSCRIBE UPDATE UPDATEREDIRECTREF VERSION-CONTROL X-MS-ENUMATTS </p>
<p>This makes me sad.  A few like &#8220;CONNECT&#8221; or &#8220;TRACE&#8221; are more network oriented so those are fine.  But the group of people who designed these additional HTTP verbs really did not &#8216;get&#8217; the original intent.  </p>
<p>For instance, why would they need &#8220;MKCALENDAR&#8221; or &#8220;MKACTIVITY&#8221; at all when they could just POST it? If people followed in this vein we ought to have &#8220;MKBLOG&#8221;, &#8220;MKBLOGENTRY&#8221;, &#8220;MKBLOGCOMMENT&#8221;, &#8220;DELBLOG&#8221;, &#8230; Thankfully, we don&#8217;t! That&#8217;s because we already had everything we need! </p>
<p>Every function performed by all these HTTP verbs can be boiled down to one of &#8220;Create&#8221;, &#8220;Read&#8221;, &#8220;Update&#8221;, or &#8220;Delete&#8221;.  Having these other verbs in the protocol make the networking unnecessarily a lot more complex, and this additional complexity makes for more bugs and possible security holes &#8211; which is why Javascript is restricted from doing most of the HTTP verbs. </p>
<p>And as you say, the important thing here is that these operations do not have to be restricted for management of a single low level table at all. Of course one should not become dogmatic about a particular abstraction.</p>
<p>My personal rule of thumb here is &#8220;&#8230; think more than twice if you think you need other methods. How is it going to be anything other than a Create, Read, Update, or Delete of some resource?&#8221;</p>
<p>Regards,<br />
Jeff Koftinoff<br />
<a href="http://www.jdkoftinoff.com" rel="nofollow">http://www.jdkoftinoff.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9137</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Mon, 17 Aug 2009 10:22:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9137</guid>
		<description>I agree in principle that we should not become dogmatic about implementing a particular abstraction, rule. The only caveat I have is that so far I have discovered that what initially seems complex (having to identify a new resource rather than overload an existing one), actually turns out to be simpler once you work through the various paces that are required. However that is an argument that will require a lot of detailed supporting evidence .. something I propose to offer over the next week or two with another blog post focused on exactly the same topic.</description>
		<content:encoded><![CDATA[<p>I agree in principle that we should not become dogmatic about implementing a particular abstraction, rule. The only caveat I have is that so far I have discovered that what initially seems complex (having to identify a new resource rather than overload an existing one), actually turns out to be simpler once you work through the various paces that are required. However that is an argument that will require a lot of detailed supporting evidence .. something I propose to offer over the next week or two with another blog post focused on exactly the same topic.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis Dunn</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9136</link>
		<dc:creator>Travis Dunn</dc:creator>
		<pubDate>Mon, 17 Aug 2009 10:18:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9136</guid>
		<description>Just agreeing here with Manas Garg; REST is an abstraction for simplicity, and we should be free to reshape that abstraction if it gets us more simplicity. In fact, deciding when to violate REST is probably the central task of a developer implementing it in their application; monitoring the extent to which actions against resources push the boundary of design until they demand the extraction of a new resource.</description>
		<content:encoded><![CDATA[<p>Just agreeing here with Manas Garg; REST is an abstraction for simplicity, and we should be free to reshape that abstraction if it gets us more simplicity. In fact, deciding when to violate REST is probably the central task of a developer implementing it in their application; monitoring the extent to which actions against resources push the boundary of design until they demand the extraction of a new resource.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manas Garg</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9133</link>
		<dc:creator>Manas Garg</dc:creator>
		<pubDate>Sat, 15 Aug 2009 04:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9133</guid>
		<description>@dnene But reversal doesn&#039;t sound like a resource, does it? :)

I agree to everything that you say except the one-size-fits-all theory. CRUD is a tool that works very well in most of the cases. However, there are times when one should break the rules to keep things simple.

Eventually, the goal is not CRUD, the goal is simplicity. And when one crosses that 85% threshold, one must break the CRUD rules to retain simplicity.</description>
		<content:encoded><![CDATA[<p>@dnene But reversal doesn&#8217;t sound like a resource, does it? <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I agree to everything that you say except the one-size-fits-all theory. CRUD is a tool that works very well in most of the cases. However, there are times when one should break the rules to keep things simple.</p>
<p>Eventually, the goal is not CRUD, the goal is simplicity. And when one crosses that 85% threshold, one must break the CRUD rules to retain simplicity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9132</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Fri, 14 Aug 2009 22:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9132</guid>
		<description>&lt;blockquote&gt;As you can see, in several discussions about how to implement things using HTTP, the majority of confusions comes when you think of HTTP operations as CRUD operations, given the work you have to do does not match the simple CRUD semantic, or given you are not sure how to simply create something (the C) or update (the U) using post/put.&lt;/blockquote&gt;

I have seen many of these discussions around PUT and POST, and the way I&#039;ve internalised these is that if I am updating an existing resource its a PUT and if it is creating a new resource its a POST. However as a API designer it is my responsibility to decide what is more appropriate design under the context.

&lt;blockquote&gt;The problem there is HTTP is different to the simple four CRUD operations. That is why they are not called the same. POST is a multifunction thing, and a resource does not behave as a data element.&lt;/blockquote&gt;

The HTTP RFC refers to POST as &quot;The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI&quot; and PUT as &quot;The PUT method requests that the enclosed entity be stored under the supplied Request-URI&quot;. I&#039;ve generally found these helpful guidelines under the circumstances.

&lt;blockquote&gt;Using HTTP semantics, you POST to the userStory container resource a Split request (in the payload, not the URL), including data in the payload to indicate the container where to split, and the operation should return the data indicating the new resources created.&lt;/blockquote&gt;

The intent of the request or the logical resource that is being created (the split) is being conveyed by the URI - its only the supporting data for the same that is being conveyed through the payload. Thats pretty consistent with HTTP imo. 

&lt;blockquote&gt;Upgrading a Task is clearly a PUT, where you replace the actual resource with the one in the payload&lt;/blockquote&gt;

I don&#039;t think it is so clear. Again as a designer you make the choice. In this case a Task is being upgraded / converted to a story. I would feel very hard pressed to justify a PUT.

While I did offer different opinions there, I think we perhaps do agree on the fact that using CRUD as a metaphor in the context of data records alone is perhaps bad. I suggest that given the choice of decrying / berating CRUD, and explaining that CRUD needs to be viewed in the context of resources, and also as an interface and not an implementation, I would choose the latter - which is what this blog post is all about.</description>
		<content:encoded><![CDATA[<blockquote><p>As you can see, in several discussions about how to implement things using HTTP, the majority of confusions comes when you think of HTTP operations as CRUD operations, given the work you have to do does not match the simple CRUD semantic, or given you are not sure how to simply create something (the C) or update (the U) using post/put.</p></blockquote>
<p>I have seen many of these discussions around PUT and POST, and the way I&#8217;ve internalised these is that if I am updating an existing resource its a PUT and if it is creating a new resource its a POST. However as a API designer it is my responsibility to decide what is more appropriate design under the context.</p>
<blockquote><p>The problem there is HTTP is different to the simple four CRUD operations. That is why they are not called the same. POST is a multifunction thing, and a resource does not behave as a data element.</p></blockquote>
<p>The HTTP RFC refers to POST as &#8220;The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-URI&#8221; and PUT as &#8220;The PUT method requests that the enclosed entity be stored under the supplied Request-URI&#8221;. I&#8217;ve generally found these helpful guidelines under the circumstances.</p>
<blockquote><p>Using HTTP semantics, you POST to the userStory container resource a Split request (in the payload, not the URL), including data in the payload to indicate the container where to split, and the operation should return the data indicating the new resources created.</p></blockquote>
<p>The intent of the request or the logical resource that is being created (the split) is being conveyed by the URI &#8211; its only the supporting data for the same that is being conveyed through the payload. Thats pretty consistent with HTTP imo. </p>
<blockquote><p>Upgrading a Task is clearly a PUT, where you replace the actual resource with the one in the payload</p></blockquote>
<p>I don&#8217;t think it is so clear. Again as a designer you make the choice. In this case a Task is being upgraded / converted to a story. I would feel very hard pressed to justify a PUT.</p>
<p>While I did offer different opinions there, I think we perhaps do agree on the fact that using CRUD as a metaphor in the context of data records alone is perhaps bad. I suggest that given the choice of decrying / berating CRUD, and explaining that CRUD needs to be viewed in the context of resources, and also as an interface and not an implementation, I would choose the latter &#8211; which is what this blog post is all about.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9131</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Fri, 14 Aug 2009 21:45:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9131</guid>
		<description>&lt;blockquote&gt;CRUD is fine. It may work well for 80% cases. May be even 85% cases. However, just like everything else, it has limitations&lt;/blockquote&gt;

Sure, like any other style it will have some limitations, some pecularities and some strengths. In a different post actually &lt;a href=&quot;http://blog.dhananjaynene.com/2009/06/why-rest&quot; rel=&quot;nofollow&quot;&gt;Why REST ?&lt;/a&gt; I attempt to address in an extremely high level of detail, not only the similarities but also how REST style was influenced by web protocols such as HTTP and FTP.

&lt;blockquote&gt;Introduce a new verb and do REVERT “/verobj/obj_type/{obj_id}”. Since, there is nothing like REVERT in HTTP, I overload PUT and pass revert as a parameter to it.&lt;/blockquote&gt;

That in essence can also be looked at as the feature of REST (just a matter of deciding what goggles one wants to put on). The Uniform Interface constraints of REST ensures that the API is consistent and even though it may constrain you from adding a REVERT, it may in many cases make things for the clients due to the consistency it enforces. That consistency is characteristic to be cherished.

Would I overload PUT and pass a revert parameter ? I would actually POST a /verobj/obj_type/{obj_id}/reversal . While constraining the methods, REST does give all of us a relatively free hand in designing the resource structure, and its through discussions like this that we collectively shall not only get better at it, but hopefully to some extent more consistent as well.</description>
		<content:encoded><![CDATA[<blockquote><p>CRUD is fine. It may work well for 80% cases. May be even 85% cases. However, just like everything else, it has limitations</p></blockquote>
<p>Sure, like any other style it will have some limitations, some pecularities and some strengths. In a different post actually <a href="http://blog.dhananjaynene.com/2009/06/why-rest" rel="nofollow">Why REST ?</a> I attempt to address in an extremely high level of detail, not only the similarities but also how REST style was influenced by web protocols such as HTTP and FTP.</p>
<blockquote><p>Introduce a new verb and do REVERT “/verobj/obj_type/{obj_id}”. Since, there is nothing like REVERT in HTTP, I overload PUT and pass revert as a parameter to it.</p></blockquote>
<p>That in essence can also be looked at as the feature of REST (just a matter of deciding what goggles one wants to put on). The Uniform Interface constraints of REST ensures that the API is consistent and even though it may constrain you from adding a REVERT, it may in many cases make things for the clients due to the consistency it enforces. That consistency is characteristic to be cherished.</p>
<p>Would I overload PUT and pass a revert parameter ? I would actually POST a /verobj/obj_type/{obj_id}/reversal . While constraining the methods, REST does give all of us a relatively free hand in designing the resource structure, and its through discussions like this that we collectively shall not only get better at it, but hopefully to some extent more consistent as well.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Martinez Pomares</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9129</link>
		<dc:creator>William Martinez Pomares</dc:creator>
		<pubDate>Fri, 14 Aug 2009 19:20:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9129</guid>
		<description>Hello Dhananjay.
I agree with all reasons, but disagree a little bit about CRUD and also about the proposed API.

First, CRUD. Create, Read, Update, Delete are the major operations for a data record (or data element) metaphor. It is not bad, but not necessarily THE semantics of HTTP. 
As you can see, in several discussions about how to implement things using HTTP, the majority of confusions comes when you think of HTTP operations as CRUD operations, given the work you have to do does not match the simple CRUD semantic, or given you are not sure how to simply create something (the C) or update (the U) using post/put. 

The problem there is HTTP is different to the simple four CRUD operations. That is why they are not called the same. POST is a multifunction thing, and a resource does not behave as a data element. 

Let&#039;s see it this way. In CRUD you can Create, Read, Update and Delete a data element.
In HTTP, you can POST a payload to a managing resource in a server, you can PUT a resource to a server, you can GET a resource representation from a server, and you can DELETE (or disable) a resource in a server.

Similar? Yes, but not equal. If using the CRUD semantics, things like splitting the user story means you have to delete the original one, and insert to new ones, right?
Using HTTP semantics, you POST to the userStory container resource a Split request (in the payload, not the URL), including data in the payload to indicate the container where to split, and the operation should return the data indicating the new resources created. 

Upgrading a Task is clearly a PUT, where you replace the actual resource with the one in the payload. Of course, it is rich enough to allow adding to the payload only the upgrade info, so you don&#039;t send the full entity again.
See the difference? If I think in HTTP semantics, it is easier for me to know how to do things. At least, I see it this way.

Last, the URL. As per our discussions, things like /story/{story_id}/StorySplit should be used carefully. the StorySplit at the end is the identification of a resource contained or managed by /story/{story_id} resource. It is a noun, not a verb. This is to avoid the action or method description in the URL. The idea of posting to that as a resource is totally correct, as a resource may be dynamic and may not be related to an &quot;physical&quot; entity, but just a concept.

Note however, that HTTP provides metadata too in terms of headers. So, a GET to that StorySplit may return metadata in headers and no content! Same, DELETE to that StorySplit may mean to rollback the split, which we may not want to do. 

The thing I love from this is the richness of the discussions!

Regards.</description>
		<content:encoded><![CDATA[<p>Hello Dhananjay.<br />
I agree with all reasons, but disagree a little bit about CRUD and also about the proposed API.</p>
<p>First, CRUD. Create, Read, Update, Delete are the major operations for a data record (or data element) metaphor. It is not bad, but not necessarily THE semantics of HTTP.<br />
As you can see, in several discussions about how to implement things using HTTP, the majority of confusions comes when you think of HTTP operations as CRUD operations, given the work you have to do does not match the simple CRUD semantic, or given you are not sure how to simply create something (the C) or update (the U) using post/put. </p>
<p>The problem there is HTTP is different to the simple four CRUD operations. That is why they are not called the same. POST is a multifunction thing, and a resource does not behave as a data element. </p>
<p>Let&#8217;s see it this way. In CRUD you can Create, Read, Update and Delete a data element.<br />
In HTTP, you can POST a payload to a managing resource in a server, you can PUT a resource to a server, you can GET a resource representation from a server, and you can DELETE (or disable) a resource in a server.</p>
<p>Similar? Yes, but not equal. If using the CRUD semantics, things like splitting the user story means you have to delete the original one, and insert to new ones, right?<br />
Using HTTP semantics, you POST to the userStory container resource a Split request (in the payload, not the URL), including data in the payload to indicate the container where to split, and the operation should return the data indicating the new resources created. </p>
<p>Upgrading a Task is clearly a PUT, where you replace the actual resource with the one in the payload. Of course, it is rich enough to allow adding to the payload only the upgrade info, so you don&#8217;t send the full entity again.<br />
See the difference? If I think in HTTP semantics, it is easier for me to know how to do things. At least, I see it this way.</p>
<p>Last, the URL. As per our discussions, things like /story/{story_id}/StorySplit should be used carefully. the StorySplit at the end is the identification of a resource contained or managed by /story/{story_id} resource. It is a noun, not a verb. This is to avoid the action or method description in the URL. The idea of posting to that as a resource is totally correct, as a resource may be dynamic and may not be related to an &#8220;physical&#8221; entity, but just a concept.</p>
<p>Note however, that HTTP provides metadata too in terms of headers. So, a GET to that StorySplit may return metadata in headers and no content! Same, DELETE to that StorySplit may mean to rollback the split, which we may not want to do. </p>
<p>The thing I love from this is the richness of the discussions!</p>
<p>Regards.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manas Garg</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9128</link>
		<dc:creator>Manas Garg</dc:creator>
		<pubDate>Fri, 14 Aug 2009 17:05:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9128</guid>
		<description>From the SNMP days, I remember that everything could be expressed in terms of get/set. Of course, in that world, there was no notion of create/delete because the resources were predefined by the vendors.

SNMP has been successful for this reason and this is precisely the same reason for which people have hated SNMP. At the end of the day, more complicated things could not be expressed in get/set. It kept getting harder and harder to cleanly model resources in the system which could be get/set. Most of the MIBs for routers/switches look horrible today.

When I want to block a MAC on a switch, my mind sees it as an action to the effect &quot;go block a MAC&quot;. But in SNMP world, first a resource had to be identified and then a state variable will be created and then one could set that variable.

As I mentioned earlier, that&#039;s what made SNMP so wildly successful because it was very easy to implement things. But at the same time, the switch vendors were forced into exposing CORBA or other interfaces because the modeling was non-intuitive most of the time.

CRUD is fine. It may work well for 80% cases. May be even 85% cases. However, just like everything else, it has limitations. You can always model it in CRUD manner. But there are cases when introducing new verbs will be more graceful.

To give a real world example, Trailofview has an object versioning system. You can access the latest version of an object in the form /verobj/obj_type/{obj_id} and you can also access an older version of the same obj /verobj/obj_type/{obj_id}/rev/{rev_id}.

Now, there is a facility to revert an object to older revision. In my opinion, there are two ways to do it:

1. First fetch the values in a specific revision GET &quot;/verobj/obj_type/{obj_id}/rev/{rev_id}&quot; and then update the resource by putting those values PUT &quot;/verobj/obj_type/{obj_id}&quot;

2. Introduce a new verb and do REVERT &quot;/verobj/obj_type/{obj_id}&quot;. Since, there is nothing like REVERT in HTTP, I overload PUT and pass revert as a parameter to it.

While #1 is possible and is more crudy but #2 is more direct and sounds more natural to me.</description>
		<content:encoded><![CDATA[<p>From the SNMP days, I remember that everything could be expressed in terms of get/set. Of course, in that world, there was no notion of create/delete because the resources were predefined by the vendors.</p>
<p>SNMP has been successful for this reason and this is precisely the same reason for which people have hated SNMP. At the end of the day, more complicated things could not be expressed in get/set. It kept getting harder and harder to cleanly model resources in the system which could be get/set. Most of the MIBs for routers/switches look horrible today.</p>
<p>When I want to block a MAC on a switch, my mind sees it as an action to the effect &#8220;go block a MAC&#8221;. But in SNMP world, first a resource had to be identified and then a state variable will be created and then one could set that variable.</p>
<p>As I mentioned earlier, that&#8217;s what made SNMP so wildly successful because it was very easy to implement things. But at the same time, the switch vendors were forced into exposing CORBA or other interfaces because the modeling was non-intuitive most of the time.</p>
<p>CRUD is fine. It may work well for 80% cases. May be even 85% cases. However, just like everything else, it has limitations. You can always model it in CRUD manner. But there are cases when introducing new verbs will be more graceful.</p>
<p>To give a real world example, Trailofview has an object versioning system. You can access the latest version of an object in the form /verobj/obj_type/{obj_id} and you can also access an older version of the same obj /verobj/obj_type/{obj_id}/rev/{rev_id}.</p>
<p>Now, there is a facility to revert an object to older revision. In my opinion, there are two ways to do it:</p>
<p>1. First fetch the values in a specific revision GET &#8220;/verobj/obj_type/{obj_id}/rev/{rev_id}&#8221; and then update the resource by putting those values PUT &#8220;/verobj/obj_type/{obj_id}&#8221;</p>
<p>2. Introduce a new verb and do REVERT &#8220;/verobj/obj_type/{obj_id}&#8221;. Since, there is nothing like REVERT in HTTP, I overload PUT and pass revert as a parameter to it.</p>
<p>While #1 is possible and is more crudy but #2 is more direct and sounds more natural to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9127</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Fri, 14 Aug 2009 13:34:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9127</guid>
		<description>Yes, there is indeed a mind shift, and a pretty strong one at that. Whatever style one uses, the essential atomic elements of an API do not change - what REST changes is the way these API elements get represented. What it does cause a shift in is that instead of thinking of something as a (remote) method with a signature, it requires one to think of a HTTP Method + Resource pair. As a consequence many verbs in the former style do become a HTTP Method + noun in the latter. eg. story.split() became POST story/{id}/storysplit

One of the positive consequences of this shift is that for the end user of the API, things become far easier. as &lt;a href=&quot;http://www.subbu.org/&quot; rel=&quot;nofollow&quot;&gt;Subbu Allamaraju&lt;/a&gt; portrays very eloquently in &lt;a href=&quot;http://www.infoq.com/articles/subbu-allamaraju-rest&quot; rel=&quot;nofollow&quot;&gt;Describing RESTful applications&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Yes, there is indeed a mind shift, and a pretty strong one at that. Whatever style one uses, the essential atomic elements of an API do not change &#8211; what REST changes is the way these API elements get represented. What it does cause a shift in is that instead of thinking of something as a (remote) method with a signature, it requires one to think of a HTTP Method + Resource pair. As a consequence many verbs in the former style do become a HTTP Method + noun in the latter. eg. story.split() became POST story/{id}/storysplit</p>
<p>One of the positive consequences of this shift is that for the end user of the API, things become far easier. as <a href="http://www.subbu.org/" rel="nofollow">Subbu Allamaraju</a> portrays very eloquently in <a href="http://www.infoq.com/articles/subbu-allamaraju-rest" rel="nofollow">Describing RESTful applications</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Niebudek</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9126</link>
		<dc:creator>Marcin Niebudek</dc:creator>
		<pubDate>Fri, 14 Aug 2009 12:15:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9126</guid>
		<description>I also thought about this approach with a new resource but for me this just introduces a set of &quot;temporary&quot; resources as they live only during POST operation (yes I don&#039;t need to store StorySplit or TaskUpgrade anywhere).  

This is something that probably requires a mind shift for somebody still thinking more RPC style or more OO style :-) An maybe REST also require thinking about resources as not about sth permanent/persistent.

Generally in CRUD thinking the &quot;U&quot; is the problem :-) as we perceive most of the behaviors as hidden after that UPDATE part. All other are rather straightforward.</description>
		<content:encoded><![CDATA[<p>I also thought about this approach with a new resource but for me this just introduces a set of &#8220;temporary&#8221; resources as they live only during POST operation (yes I don&#8217;t need to store StorySplit or TaskUpgrade anywhere).  </p>
<p>This is something that probably requires a mind shift for somebody still thinking more RPC style or more OO style <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  An maybe REST also require thinking about resources as not about sth permanent/persistent.</p>
<p>Generally in CRUD thinking the &#8220;U&#8221; is the problem <img src='http://blog.dhananjaynene.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  as we perceive most of the behaviors as hidden after that UPDATE part. All other are rather straightforward.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9125</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Fri, 14 Aug 2009 11:34:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9125</guid>
		<description>Marcin,

This is a great example to further discuss introducing non-shallow functionality into REST applications using CRUD.

I did mention earlier that resource identification and scoping actually turns out to be the aspect which requires some skill when designing REST interfaces. Based on my understanding of agile methodologies and tools, and based on the otherwise limited information I have about the context, I would probably go down the following path. You may with a slightly better understanding of the context choose a more appropriate path.

A story being split is a resource - say StorySplit. When I split a story, I would need at least the following information :

&lt;ul&gt;
	&lt;li&gt;The name of the new story&lt;/li&gt;
	&lt;li&gt;The URI of the story being split&lt;/li&gt;
	&lt;li&gt;The list of URIs of the tasks being moved over to the new story&lt;/li&gt;
&lt;/ul&gt;

These would form the essential attributes for creation a StorySplit resource. There is one more attribute that will eventually become an attribute of this resource - thats the URI of the new story so formed.

A POST on say /story/{story_id}/StorySplit would result in a creation of new story with a URI /story/{new_story_id}. The name of the new story will be as was requested in the StorySplit resource and the tasks that were moved will now be visible when GET on the new story, and will no longer be visible on GET on the old story.

A moot question would be would you want to support a GET on the StorySplit itself. Note that even if REST requires you to maintain a Uniform Interface - it does not require you to implement every one of the methods. Thus if it is not important to store the history of a story split, the same need not be supported at all. Consequently PUT and DELETE will also be irrelevant in case of a StorySplit - and the only method to be supported is POST. In such a situation, you may not be required to create a new domain object / table to reflect a story split. 

On the other hand if it is important to maintain the history of a StorySplit, then it might be helpful to define the domain object / table to reflect the story split. Moreover the StorySplit could be accessed using a GET /story/{story_id}/StorySplit/{story_split_id} or GET /storysplit/{id}. Even in this situation it is less than likely you might want to support a PUT or a DELETE operation on a StorySplit (though it is not unimaginable to do so).

Similarly a POST /task/{id}/story_upgrade could result in the earlier task getting delinked from the earlier story, and getting attached to a new story that gets created (assuming one would want the same task to get moved to a new story). 

Finally to the general question you refer to - I would not overload a single resource locator /userstory/{id} with multiple connotations based on different / unique datastructures, beyond those clearly identified as separate based on HTTP methods. I would define a new resource type, support a POST on the new resource type, support a GET if history is important, and finally support a PUT and DELETE if it contextually makes sense - but all of these on a new resource type eg.on /userstory/{id}/new_resource_type or on /new_resource_type  (the latter would require that the id&#039;s for the new resource types are unique and do not require the userstory id to be resolved into the new resource ie. the id is alone can function as a primary key for the new resource type.</description>
		<content:encoded><![CDATA[<p>Marcin,</p>
<p>This is a great example to further discuss introducing non-shallow functionality into REST applications using CRUD.</p>
<p>I did mention earlier that resource identification and scoping actually turns out to be the aspect which requires some skill when designing REST interfaces. Based on my understanding of agile methodologies and tools, and based on the otherwise limited information I have about the context, I would probably go down the following path. You may with a slightly better understanding of the context choose a more appropriate path.</p>
<p>A story being split is a resource &#8211; say StorySplit. When I split a story, I would need at least the following information :</p>
<ul>
<li>The name of the new story</li>
<li>The URI of the story being split</li>
<li>The list of URIs of the tasks being moved over to the new story</li>
</ul>
<p>These would form the essential attributes for creation a StorySplit resource. There is one more attribute that will eventually become an attribute of this resource &#8211; thats the URI of the new story so formed.</p>
<p>A POST on say /story/{story_id}/StorySplit would result in a creation of new story with a URI /story/{new_story_id}. The name of the new story will be as was requested in the StorySplit resource and the tasks that were moved will now be visible when GET on the new story, and will no longer be visible on GET on the old story.</p>
<p>A moot question would be would you want to support a GET on the StorySplit itself. Note that even if REST requires you to maintain a Uniform Interface &#8211; it does not require you to implement every one of the methods. Thus if it is not important to store the history of a story split, the same need not be supported at all. Consequently PUT and DELETE will also be irrelevant in case of a StorySplit &#8211; and the only method to be supported is POST. In such a situation, you may not be required to create a new domain object / table to reflect a story split. </p>
<p>On the other hand if it is important to maintain the history of a StorySplit, then it might be helpful to define the domain object / table to reflect the story split. Moreover the StorySplit could be accessed using a GET /story/{story_id}/StorySplit/{story_split_id} or GET /storysplit/{id}. Even in this situation it is less than likely you might want to support a PUT or a DELETE operation on a StorySplit (though it is not unimaginable to do so).</p>
<p>Similarly a POST /task/{id}/story_upgrade could result in the earlier task getting delinked from the earlier story, and getting attached to a new story that gets created (assuming one would want the same task to get moved to a new story). </p>
<p>Finally to the general question you refer to &#8211; I would not overload a single resource locator /userstory/{id} with multiple connotations based on different / unique datastructures, beyond those clearly identified as separate based on HTTP methods. I would define a new resource type, support a POST on the new resource type, support a GET if history is important, and finally support a PUT and DELETE if it contextually makes sense &#8211; but all of these on a new resource type eg.on /userstory/{id}/new_resource_type or on /new_resource_type  (the latter would require that the id&#8217;s for the new resource types are unique and do not require the userstory id to be resolved into the new resource ie. the id is alone can function as a primary key for the new resource type.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marcin Niebudek</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9124</link>
		<dc:creator>Marcin Niebudek</dc:creator>
		<pubDate>Fri, 14 Aug 2009 10:48:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9124</guid>
		<description>Thank you for the post!

I have one concern. When we access resources over HTTP we have just a few HTTP methods to trigger behaviors on our resources. So how do we deal correctly with many different behaviors using this limited set of HTTP methods?

An example (not from banking, but from an agile context, but should be understandable). 

We have a UserStory as a resource. To change the UserStory data we use PUT and send a new version of a resource. The change in the data can of course trigger some side effects on the server. That&#039;s easy. 

How about splitting user story into two resources (common operation you can do with a UserStory)?

This is in some way a &quot;create&quot; operation (new user story being added) and in other way an &quot;update&quot; (the old user story stays but we can move some tasks to the newly created one). We can also think of this as creating two new user stories, but anyway then we need a delete of an old one as a side effect. So what would it be:

PUT /userstory/{id} with some data including a reference to a base user story that is to be split

or maybe:

POST /userstories

or maybe something else?

The other example is upgrading a Task (a part of a user story) to a UserStory. Again this is not a regular update, but more a transformation of a Resource to another one.

More general question is if it is expected to use a a single resource locator (here URI like /userstory/{id}) with different data sent to it to trigger different behaviors (the server will recognize the type of data send to the resource and will do what is required) or should we rather use a unique data structure when for example POSTing to that URI?

Regards,
Marcin</description>
		<content:encoded><![CDATA[<p>Thank you for the post!</p>
<p>I have one concern. When we access resources over HTTP we have just a few HTTP methods to trigger behaviors on our resources. So how do we deal correctly with many different behaviors using this limited set of HTTP methods?</p>
<p>An example (not from banking, but from an agile context, but should be understandable). </p>
<p>We have a UserStory as a resource. To change the UserStory data we use PUT and send a new version of a resource. The change in the data can of course trigger some side effects on the server. That&#8217;s easy. </p>
<p>How about splitting user story into two resources (common operation you can do with a UserStory)?</p>
<p>This is in some way a &#8220;create&#8221; operation (new user story being added) and in other way an &#8220;update&#8221; (the old user story stays but we can move some tasks to the newly created one). We can also think of this as creating two new user stories, but anyway then we need a delete of an old one as a side effect. So what would it be:</p>
<p>PUT /userstory/{id} with some data including a reference to a base user story that is to be split</p>
<p>or maybe:</p>
<p>POST /userstories</p>
<p>or maybe something else?</p>
<p>The other example is upgrading a Task (a part of a user story) to a UserStory. Again this is not a regular update, but more a transformation of a Resource to another one.</p>
<p>More general question is if it is expected to use a a single resource locator (here URI like /userstory/{id}) with different data sent to it to trigger different behaviors (the server will recognize the type of data send to the resource and will do what is required) or should we rather use a unique data structure when for example POSTing to that URI?</p>
<p>Regards,<br />
Marcin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dhananjay Nene</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9123</link>
		<dc:creator>Dhananjay Nene</dc:creator>
		<pubDate>Fri, 14 Aug 2009 09:50:11 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9123</guid>
		<description>@mendelt

One of the surprising aspects of berating CRUD in the context of REST is that people forget what it came from. It comes from the Uniform Interface constraint, which is exactly how HTTP got designed as well. While REST doesn&#039;t say it should be CRUD (it just says it should be uniform), the Uniform Interface exported by HTTP is very CRUD like. And while I didn&#039;t explicitly state it in the post body itself, if one is not using CRUD especially when used with HTTP, then the RESTfulness of the interface could also be called into question. 

I think your observation about it not being CRUD for CRUD frontends is absolutely correct. I would go on to add that the interactivity you refer to can be added by either the applications on top or by proper resource identification and scoping.</description>
		<content:encoded><![CDATA[<p>@mendelt</p>
<p>One of the surprising aspects of berating CRUD in the context of REST is that people forget what it came from. It comes from the Uniform Interface constraint, which is exactly how HTTP got designed as well. While REST doesn&#8217;t say it should be CRUD (it just says it should be uniform), the Uniform Interface exported by HTTP is very CRUD like. And while I didn&#8217;t explicitly state it in the post body itself, if one is not using CRUD especially when used with HTTP, then the RESTfulness of the interface could also be called into question. </p>
<p>I think your observation about it not being CRUD for CRUD frontends is absolutely correct. I would go on to add that the interactivity you refer to can be added by either the applications on top or by proper resource identification and scoping.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mendelt Siebenga</title>
		<link>http://blog.dhananjaynene.com/2009/08/crud-is-not-only-good-for-but-is-the-only-consistent-way-to-build-rest-over-http/comment-page-1/#comment-9122</link>
		<dc:creator>Mendelt Siebenga</dc:creator>
		<pubDate>Fri, 14 Aug 2009 09:03:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.dhananjaynene.com/?p=787#comment-9122</guid>
		<description>Nice post, I completely agree. People say CRUD like it&#039;s a bad thing, and if you have a CRUD frontend it probably is. But we&#039;re not talking about frontends here. Http is all about CRUD, so if you want to create services on top of it they should be pretty CRUDdy too if you want them to make use of the scalability of the HTTP protocol. It&#039;s then up to the applications you build on top of these services to add interactivity. Twitter is a great example of how you can do this.</description>
		<content:encoded><![CDATA[<p>Nice post, I completely agree. People say CRUD like it&#8217;s a bad thing, and if you have a CRUD frontend it probably is. But we&#8217;re not talking about frontends here. Http is all about CRUD, so if you want to create services on top of it they should be pretty CRUDdy too if you want them to make use of the scalability of the HTTP protocol. It&#8217;s then up to the applications you build on top of these services to add interactivity. Twitter is a great example of how you can do this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.814 seconds -->

