<?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: It is okay to use POST</title>
	<atom:link href="http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post/feed" rel="self" type="application/rss+xml" />
	<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post</link>
	<description>musings of Roy T. Fielding</description>
	<lastBuildDate>Thu, 21 May 2009 18:54:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Roy T. Fielding</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-997</link>
		<dc:creator>Roy T. Fielding</dc:creator>
		<pubDate>Fri, 03 Apr 2009 01:06:18 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-997</guid>
		<description>William, I talked about the phenomenon of design-by-buzzword in the &lt;a href=&quot;http://www.ics.uci.edu/~fielding/pubs/dissertation/introduction.htm&quot; rel=&quot;nofollow&quot;&gt;introduction to my dissertation&lt;/a&gt;. It doesn&#039;t surprise me that software companies and consultants continue to use the same marketing and design tactics, even after they&#039;ve updated their buzzword vocabulary to include REST.

Nevertheless, there are plenty of information systems that can be designed using the REST architectural style and gain the associated benefits. Managing cloud instances is certainly one of those applications for which REST is a good fit, as &lt;a href=&quot;http://www.stucharlton.com/blog/&quot; rel=&quot;nofollow&quot;&gt;Stu Charlton&lt;/a&gt; has described several times.  I am glad that Tim and others in the Kenai project are making the attempt, even if the first few iterations have some warts, and I approve of his stance that the design constraints of REST should be used when they are useful, not just because they are RESTful.</description>
		<content:encoded><![CDATA[<p>William, I talked about the phenomenon of design-by-buzzword in the <a href="http://www.ics.uci.edu/~fielding/pubs/dissertation/introduction.htm" rel="nofollow">introduction to my dissertation</a>. It doesn&#8217;t surprise me that software companies and consultants continue to use the same marketing and design tactics, even after they&#8217;ve updated their buzzword vocabulary to include REST.</p>
<p>Nevertheless, there are plenty of information systems that can be designed using the REST architectural style and gain the associated benefits. Managing cloud instances is certainly one of those applications for which REST is a good fit, as <a href="http://www.stucharlton.com/blog/" rel="nofollow">Stu Charlton</a> has described several times.  I am glad that Tim and others in the Kenai project are making the attempt, even if the first few iterations have some warts, and I approve of his stance that the design constraints of REST should be used when they are useful, not just because they are RESTful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy T. Fielding</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-996</link>
		<dc:creator>Roy T. Fielding</dc:creator>
		<pubDate>Fri, 03 Apr 2009 00:47:28 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-996</guid>
		<description>Andrew, there is no such thing as &quot;Common REST&quot; (nor, for that matter, the alternative declarations of &quot;Low REST&quot; and &quot;High REST&quot;).  There is just REST.  The problem is that various people have described &quot;I am using HTTP&quot; as some sort of style in itself and then used the REST moniker for branding (or excuses) even when they haven&#039;t the slightest idea what it means. The only way to stop people from misusing the term is to make a negative example of them when they do.

The Wikipedia article suffers from that and also because the folks writing it did not feel a need to constrain themselves to authoritative sources. There is not much I can do about the poor quality of the description aside from editing the article myself, which I&#039;ve avoided doing because it would be too self-referential. Please feel free to fix it.</description>
		<content:encoded><![CDATA[<p>Andrew, there is no such thing as &#8220;Common REST&#8221; (nor, for that matter, the alternative declarations of &#8220;Low REST&#8221; and &#8220;High REST&#8221;).  There is just REST.  The problem is that various people have described &#8220;I am using HTTP&#8221; as some sort of style in itself and then used the REST moniker for branding (or excuses) even when they haven&#8217;t the slightest idea what it means. The only way to stop people from misusing the term is to make a negative example of them when they do.</p>
<p>The Wikipedia article suffers from that and also because the folks writing it did not feel a need to constrain themselves to authoritative sources. There is not much I can do about the poor quality of the description aside from editing the article myself, which I&#8217;ve avoided doing because it would be too self-referential. Please feel free to fix it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William Martinez Pomares</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-995</link>
		<dc:creator>William Martinez Pomares</dc:creator>
		<pubDate>Thu, 02 Apr 2009 18:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-995</guid>
		<description>Hello Roy.
I just submitted this comment at the InfoQ forum.

http://www.infoq.com/news/2009/04/post-state-appropriate#view_40928

 My main concern is not actually the POST, but the way the REST is being forced into applications just by the sake of having it in its name!

Reading the HTTP spec, we can find what Post is supposed to do. And I think we can find a couple of ways for applying these semantics into the problem. But the issue is not the POST at the HTTP Spec, but the POST as REST is supposed to see it. 

So, I feel we are trying to make the application fit into REST, instead of analyzing if REST is the suitable option for that application. Since REST is a style, and it is not the only one to work with web or networked applications, I guess the first question would be if my app solution requirements match those of REST and so it is good to follow that style, or we better go with any other that better matches my needs.

In Tim&#039;s problem app, I can just guess that if he is struggling to map the elements and operations into resources and states, in a very artificial way (no natural to the app), we may be tweaking the app to fit the architecture. That is, wagging the dog.

What do you think?

William Martinez Pomares.</description>
		<content:encoded><![CDATA[<p>Hello Roy.<br />
I just submitted this comment at the InfoQ forum.</p>
<p><a href="http://www.infoq.com/news/2009/04/post-state-appropriate#view_40928" rel="nofollow">http://www.infoq.com/news/2009/04/post-state-appropriate#view_40928</a></p>
<p> My main concern is not actually the POST, but the way the REST is being forced into applications just by the sake of having it in its name!</p>
<p>Reading the HTTP spec, we can find what Post is supposed to do. And I think we can find a couple of ways for applying these semantics into the problem. But the issue is not the POST at the HTTP Spec, but the POST as REST is supposed to see it. </p>
<p>So, I feel we are trying to make the application fit into REST, instead of analyzing if REST is the suitable option for that application. Since REST is a style, and it is not the only one to work with web or networked applications, I guess the first question would be if my app solution requirements match those of REST and so it is good to follow that style, or we better go with any other that better matches my needs.</p>
<p>In Tim&#8217;s problem app, I can just guess that if he is struggling to map the elements and operations into resources and states, in a very artificial way (no natural to the app), we may be tweaking the app to fit the architecture. That is, wagging the dog.</p>
<p>What do you think?</p>
<p>William Martinez Pomares.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Labnotes &#187; Rounded Corners 232 — Hardcopied</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-989</link>
		<dc:creator>Labnotes &#187; Rounded Corners 232 — Hardcopied</dc:creator>
		<pubDate>Thu, 26 Mar 2009 20:58:37 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-989</guid>
		<description>[...] Roy Okays POST. There&#8217;s just too much HTTP method fetishism going around. I understand the appeal, I don&#8217;t mind what other people do in the privacy of their own service invocation, and I can see how it acts as counter balance to the SOAP fetish of yore. But it confuses people who should know better, leading them down the path of really creative (read: tightly coupled, unnecessarily complex) verb-based protocols. Hopefully, not for long. [...]</description>
		<content:encoded><![CDATA[<p>[...] Roy Okays POST. There&#8217;s just too much HTTP method fetishism going around. I understand the appeal, I don&#8217;t mind what other people do in the privacy of their own service invocation, and I can see how it acts as counter balance to the SOAP fetish of yore. But it confuses people who should know better, leading them down the path of really creative (read: tightly coupled, unnecessarily complex) verb-based protocols. Hopefully, not for long. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Wahbe</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-988</link>
		<dc:creator>Andrew Wahbe</dc:creator>
		<pubDate>Thu, 26 Mar 2009 15:00:59 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-988</guid>
		<description>Roy, 
I think folks have trouble with using POST to implement a &quot;button&quot; because on the surface it looks a bit like RPC which they have been told is &quot;bad&quot;. Each button has a URI and each button can be thought of as a method that can be invoked. Therefore, the method is represented in the URI and now the sky is falling.

Of course the difference with the RESTful approach is that the URI and instructions for constructing the request body for the POST are represented in hypermedia and not baked into the client as with RPC. As you pointed out in your &quot;REST APIs must by hypertext-driven&quot; posting, most people don&#039;t get this distinction (for reasons touched on in your follow up to that post). I&#039;m not sure how this situation gets &quot;fixed&quot; but I don&#039;t see it changing any time soon.

&quot;Common REST&quot; is all about using PUT and DELETE and organizing your data into CRUD-based interfaces. Hypermedia doesn&#039;t really come into play beyond the recommendation to &quot;put links to other resources in your representations&quot;. This is of course lacking any sort of mechanism (e.g. a form) for constructing the request body of a POST. And so POST just isn&#039;t used in any way other than asking a parent resource to create a child resource and assign a URI to it. e.g. it&#039;s just a PUT where you are asking the server to assign a URI instead of supplying your own.

Common REST is winning mindshare over REST as you defined it. In an environment where the number of links defines authority that means Common REST IS REST. 

Google &quot;REST&quot; and you will see that the wikipedia entry has the top position -- that entry defines Common REST.

Andrew Wahbe</description>
		<content:encoded><![CDATA[<p>Roy,<br />
I think folks have trouble with using POST to implement a &#8220;button&#8221; because on the surface it looks a bit like RPC which they have been told is &#8220;bad&#8221;. Each button has a URI and each button can be thought of as a method that can be invoked. Therefore, the method is represented in the URI and now the sky is falling.</p>
<p>Of course the difference with the RESTful approach is that the URI and instructions for constructing the request body for the POST are represented in hypermedia and not baked into the client as with RPC. As you pointed out in your &#8220;REST APIs must by hypertext-driven&#8221; posting, most people don&#8217;t get this distinction (for reasons touched on in your follow up to that post). I&#8217;m not sure how this situation gets &#8220;fixed&#8221; but I don&#8217;t see it changing any time soon.</p>
<p>&#8220;Common REST&#8221; is all about using PUT and DELETE and organizing your data into CRUD-based interfaces. Hypermedia doesn&#8217;t really come into play beyond the recommendation to &#8220;put links to other resources in your representations&#8221;. This is of course lacking any sort of mechanism (e.g. a form) for constructing the request body of a POST. And so POST just isn&#8217;t used in any way other than asking a parent resource to create a child resource and assign a URI to it. e.g. it&#8217;s just a PUT where you are asking the server to assign a URI instead of supplying your own.</p>
<p>Common REST is winning mindshare over REST as you defined it. In an environment where the number of links defines authority that means Common REST IS REST. </p>
<p>Google &#8220;REST&#8221; and you will see that the wikipedia entry has the top position &#8212; that entry defines Common REST.</p>
<p>Andrew Wahbe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Kelly</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-976</link>
		<dc:creator>Mike Kelly</dc:creator>
		<pubDate>Mon, 23 Mar 2009 12:06:31 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-976</guid>
		<description>Hi Roy,

Thanks for the response - I&#039;m still struggling to understand why &#039;monitored&#039; state should be preferred as non-editable. Probably because I don&#039;t see the power state as a monitored state, but simply as a state that is negotiated via the uniform interface (i.e. monitoring would be mapped to the GET method of the power resource).

Is a button a useful resource to identify? I&#039;m not sure - In real world terms a button/switch seems more like a uniform interface than a resource in and of itself.

I don&#039;t understand why a separate resource for monitoring is necessitated here - could this monitoring not be incorporated into the logic/state behind the power interface? Could that monitoring logic not &#039;loop back&#039; on itself by addressing itself via its HTTP interface; thus keeping relevant intermediaries (and hence clients) &#039;in the loop&#039;, so to speak?

That&#039;s probably enough points for now!

Thanks,
Mike</description>
		<content:encoded><![CDATA[<p>Hi Roy,</p>
<p>Thanks for the response &#8211; I&#8217;m still struggling to understand why &#8216;monitored&#8217; state should be preferred as non-editable. Probably because I don&#8217;t see the power state as a monitored state, but simply as a state that is negotiated via the uniform interface (i.e. monitoring would be mapped to the GET method of the power resource).</p>
<p>Is a button a useful resource to identify? I&#8217;m not sure &#8211; In real world terms a button/switch seems more like a uniform interface than a resource in and of itself.</p>
<p>I don&#8217;t understand why a separate resource for monitoring is necessitated here &#8211; could this monitoring not be incorporated into the logic/state behind the power interface? Could that monitoring logic not &#8216;loop back&#8217; on itself by addressing itself via its HTTP interface; thus keeping relevant intermediaries (and hence clients) &#8216;in the loop&#8217;, so to speak?</p>
<p>That&#8217;s probably enough points for now!</p>
<p>Thanks,<br />
Mike</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate Good</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-971</link>
		<dc:creator>Nate Good</dc:creator>
		<pubDate>Sun, 22 Mar 2009 08:39:28 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-971</guid>
		<description>Roy,

I agree that support for a PATCH method would be great (but first we&#039;ve got to get people and browsers to even acknowledge that PUT and DELETE exist!).  Until then, I think that giving POST this type of functionality makes things more complicated than need be.  

POST&#039;s function of treating request entities as &quot;a new subordinate of the resource identified&quot; has been most useful as a sort of factory for creating subordinate resources (e.g. POSTing to /article_id/comment to create a subordinate comment).  If we also use POST for updates or a way of achieving partial updates, I think we loose the simplistic nature of our uniform operation set.  There is now a bit of additional logic attached to the POST method - treat POST differently according to the context used.  

I would agree with Stefan that PUT is still a better choice (in nearly all cases) by it&#039;s definition and due to its idempotent nature.  

If partial updates are desired, just provide URIs that have finer granularity (e.g. in our example, PUT /article_id/comment/123/name to edit just the writer&#039;s name) and work with these as atomic units for PUTting. In many cases it can come pretty naturally and doesn&#039;t require anything additional at the persistence layer. 

I agree that there are REST zealots out there that get a bit carried away with dos and don&#039;ts, especially since REST is a style and not a set in stone implementation, however, if you do choose HTTP as your uniform interface, I believe that until other methods become adopted, PUT is most appropriate for updates.</description>
		<content:encoded><![CDATA[<p>Roy,</p>
<p>I agree that support for a PATCH method would be great (but first we&#8217;ve got to get people and browsers to even acknowledge that PUT and DELETE exist!).  Until then, I think that giving POST this type of functionality makes things more complicated than need be.  </p>
<p>POST&#8217;s function of treating request entities as &#8220;a new subordinate of the resource identified&#8221; has been most useful as a sort of factory for creating subordinate resources (e.g. POSTing to /article_id/comment to create a subordinate comment).  If we also use POST for updates or a way of achieving partial updates, I think we loose the simplistic nature of our uniform operation set.  There is now a bit of additional logic attached to the POST method &#8211; treat POST differently according to the context used.  </p>
<p>I would agree with Stefan that PUT is still a better choice (in nearly all cases) by it&#8217;s definition and due to its idempotent nature.  </p>
<p>If partial updates are desired, just provide URIs that have finer granularity (e.g. in our example, PUT /article_id/comment/123/name to edit just the writer&#8217;s name) and work with these as atomic units for PUTting. In many cases it can come pretty naturally and doesn&#8217;t require anything additional at the persistence layer. </p>
<p>I agree that there are REST zealots out there that get a bit carried away with dos and don&#8217;ts, especially since REST is a style and not a set in stone implementation, however, if you do choose HTTP as your uniform interface, I believe that until other methods become adopted, PUT is most appropriate for updates.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Philip Eskelin</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-969</link>
		<dc:creator>Philip Eskelin</dc:creator>
		<pubDate>Sun, 22 Mar 2009 03:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-969</guid>
		<description>Roy,

Thank you, I couldn&#039;t agree more with you. I appreciate all your posts on the REST architectural style and feel exact the same way with regards to its relationship to the Web architecture.  I mostly parrot what I believe is your sentiment in the following blog entry I wrote August 2008, in response to a few of your blog posts from the last half of 2008:

http://peskeflog.blogspot.com/2008/08/no-rest-for-wicked.html

Cheers,
Philip Eskelin</description>
		<content:encoded><![CDATA[<p>Roy,</p>
<p>Thank you, I couldn&#8217;t agree more with you. I appreciate all your posts on the REST architectural style and feel exact the same way with regards to its relationship to the Web architecture.  I mostly parrot what I believe is your sentiment in the following blog entry I wrote August 2008, in response to a few of your blog posts from the last half of 2008:</p>
<p><a href="http://peskeflog.blogspot.com/2008/08/no-rest-for-wicked.html" rel="nofollow">http://peskeflog.blogspot.com/2008/08/no-rest-for-wicked.html</a></p>
<p>Cheers,<br />
Philip Eskelin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy T. Fielding</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-966</link>
		<dc:creator>Roy T. Fielding</dc:creator>
		<pubDate>Sat, 21 Mar 2009 18:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-966</guid>
		<description>Mike, I personally prefer systems that treat monitored state (like power status) as non-editable. I prefer there to be a nice functional relation between the state of the system being monitored and the representations of its state. If we use HTTP methods to edit that state, then I would need a separate resource to monitor the system and tell me the real state.  That&#039;s why I would model the machine as having a current power state and a multi-state button for requesting changes to the machine. We could implement that button with PUT instead of POST, but I don&#039;t think we would gain anything by doing so, and I am quite certain that REST does not require one or the other.</description>
		<content:encoded><![CDATA[<p>Mike, I personally prefer systems that treat monitored state (like power status) as non-editable. I prefer there to be a nice functional relation between the state of the system being monitored and the representations of its state. If we use HTTP methods to edit that state, then I would need a separate resource to monitor the system and tell me the real state.  That&#8217;s why I would model the machine as having a current power state and a multi-state button for requesting changes to the machine. We could implement that button with PUT instead of POST, but I don&#8217;t think we would gain anything by doing so, and I am quite certain that REST does not require one or the other.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy T. Fielding</title>
		<link>http://roy.gbiv.com/untangled/2009/it-is-okay-to-use-post#comment-965</link>
		<dc:creator>Roy T. Fielding</dc:creator>
		<pubDate>Sat, 21 Mar 2009 18:28:21 +0000</pubDate>
		<guid isPermaLink="false">http://roy.gbiv.com/untangled/?p=69#comment-965</guid>
		<description>Stefan, I think it is better to say that we only use PUT when the update action is idempotent and the representation is complete.  I think we should define an additional resource whenever we think that resource might be useful to others in isolation, and make use of the GET/PUT methods for that resource, but I don&#039;t think we should define new resources just for the sake of avoiding POST.

PATCH is another option that, once it is sufficiently deployed, might be preferred over POST for sub-resource updates. However, we make these choices for a principled reason, not just because it seems RESTful. Ultimately, the methods should be chosen by the origin server and communicated somehow to the client via the media type or relationship processing rules. If the choice of method doesn&#039;t make any difference to the other components (i.e., neither client nor intermediaries gain any value by using PUT or PATCH over POST), then we should admit that it just doesn&#039;t matter to the architectural style.</description>
		<content:encoded><![CDATA[<p>Stefan, I think it is better to say that we only use PUT when the update action is idempotent and the representation is complete.  I think we should define an additional resource whenever we think that resource might be useful to others in isolation, and make use of the GET/PUT methods for that resource, but I don&#8217;t think we should define new resources just for the sake of avoiding POST.</p>
<p>PATCH is another option that, once it is sufficiently deployed, might be preferred over POST for sub-resource updates. However, we make these choices for a principled reason, not just because it seems RESTful. Ultimately, the methods should be chosen by the origin server and communicated somehow to the client via the media type or relationship processing rules. If the choice of method doesn&#8217;t make any difference to the other components (i.e., neither client nor intermediaries gain any value by using PUT or PATCH over POST), then we should admit that it just doesn&#8217;t matter to the architectural style.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

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