<?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"
	>
<channel>
	<title>Comments on: toward a RESTful approach to Django applications</title>
	<atom:link href="http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/</link>
	<description></description>
	<pubDate>Sun, 07 Sep 2008 00:41:04 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: stone mind &#187; Evolving a RESTful Django Contribution</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-264</link>
		<dc:creator>stone mind &#187; Evolving a RESTful Django Contribution</dc:creator>
		<pubDate>Thu, 22 Mar 2007 14:00:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-264</guid>
		<description>[...] Toward a RESTful Approach to Django Applications [...]</description>
		<content:encoded><![CDATA[<p>[...] Toward a RESTful Approach to Django Applications [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stone mind &#187; Test Driving a RESTful Django Contribution</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-196</link>
		<dc:creator>stone mind &#187; Test Driving a RESTful Django Contribution</dc:creator>
		<pubDate>Fri, 16 Mar 2007 00:47:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-196</guid>
		<description>[...] Toward a RESTful Approach to Django Applications [...]</description>
		<content:encoded><![CDATA[<p>[...] Toward a RESTful Approach to Django Applications [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stone mind &#187; django REST redux</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-131</link>
		<dc:creator>stone mind &#187; django REST redux</dc:creator>
		<pubDate>Thu, 08 Mar 2007 16:23:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-131</guid>
		<description>[...] Toward a RESTful Approach to Django Applications [...]</description>
		<content:encoded><![CDATA[<p>[...] Toward a RESTful Approach to Django Applications [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stonemind</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-80</link>
		<dc:creator>stonemind</dc:creator>
		<pubDate>Fri, 02 Mar 2007 02:31:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-80</guid>
		<description>Thanks for filling me in on the Matrix URI style (how did I miss that?). I realized the URL I mentioned was supposed to be referring to a form, but my feeling was that it read like an action, and because I think most people are more familiar with an action oriented approach, I thought it might invite confustion--but I wasn't thinking of it in the way you've described it.

And, as I reflect more on your comment, maybe some kind of approach like this would allow me to design a RESTful Web application that also works more naturally with Django's approach to url configurations and views. (Maybe the RoR folks used this approach for similar reasons, and that's why I found that example in the first place?)

I'll have to think about this some more. Thanks for taking the time to clue me in.</description>
		<content:encoded><![CDATA[<p>Thanks for filling me in on the Matrix URI style (how did I miss that?). I realized the URL I mentioned was supposed to be referring to a form, but my feeling was that it read like an action, and because I think most people are more familiar with an action oriented approach, I thought it might invite confustion&#8211;but I wasn&#8217;t thinking of it in the way you&#8217;ve described it.</p>
<p>And, as I reflect more on your comment, maybe some kind of approach like this would allow me to design a RESTful Web application that also works more naturally with Django&#8217;s approach to url configurations and views. (Maybe the RoR folks used this approach for similar reasons, and that&#8217;s why I found that example in the first place?)</p>
<p>I&#8217;ll have to think about this some more. Thanks for taking the time to clue me in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: l.m.orchard</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-79</link>
		<dc:creator>l.m.orchard</dc:creator>
		<pubDate>Fri, 02 Mar 2007 01:54:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-79</guid>
		<description>Just popping in for a quick comment about the &lt;code&gt;;edit&lt;/code&gt; thing as I understand it:  

You can think of this as another "aspect" or associated asset of a resource, specified in &lt;a href="http://www.w3.org/DesignIssues/MatrixURIs.html" rel="nofollow"&gt;Matrix URI&lt;/a&gt; style.  The &lt;code&gt;;edit&lt;/code&gt; isn't an action, it's "edit form in HTML for this resource", which would presumably contain a form with an &lt;code&gt;action="POST"&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>Just popping in for a quick comment about the <code>;edit</code> thing as I understand it:  </p>
<p>You can think of this as another &#8220;aspect&#8221; or associated asset of a resource, specified in <a href="http://www.w3.org/DesignIssues/MatrixURIs.html" rel="nofollow">Matrix URI</a> style.  The <code>;edit</code> isn&#8217;t an action, it&#8217;s &#8220;edit form in HTML for this resource&#8221;, which would presumably contain a form with an <code>action="POST"</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stonemind</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-78</link>
		<dc:creator>stonemind</dc:creator>
		<pubDate>Fri, 02 Mar 2007 01:02:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-78</guid>
		<description>Thanks for the URLs tip, I will try to incorporate it into the code. That link is really great too, I wish I had known about it before writing the post, as it seems people have already given this some thought. 

I suspect that if a truly RESTful approach is formally integrated into Django, the brains behind the framework will come up with a much more elegant solution than I did, fully integrated with the framework so it hides any complexity--like, a way to create fully RESTful URLs directly in urls.py somehow. The Django folks seem to have a knack for that sort of thing. 

The question is, just how important is REST to the Django community in the first place? If the Django developers can make REST as easy as they make everything else then I would be very enthusiastic about it, and probably others would be too, but if I have to try to push a square peg through a round hole like I did in this post, then I would have to say that being RESTful probably isn't worth the price--and I don't think that's such a terrible thing. I would rather use Django's very nice url --&gt; view approach as it was intended and focus on making a functional application for end users (and do so very quickly and easily) rather than a fully RESTful application that makes me feel good as a system designer.

(Of course, I still can't help but feel that what I tried to do might be done better by a more experienced Django developer, so I haven't closed myself off to the possibility of being more fully RESTful in Django as it is today.)</description>
		<content:encoded><![CDATA[<p>Thanks for the URLs tip, I will try to incorporate it into the code. That link is really great too, I wish I had known about it before writing the post, as it seems people have already given this some thought. </p>
<p>I suspect that if a truly RESTful approach is formally integrated into Django, the brains behind the framework will come up with a much more elegant solution than I did, fully integrated with the framework so it hides any complexity&#8211;like, a way to create fully RESTful URLs directly in urls.py somehow. The Django folks seem to have a knack for that sort of thing. </p>
<p>The question is, just how important is REST to the Django community in the first place? If the Django developers can make REST as easy as they make everything else then I would be very enthusiastic about it, and probably others would be too, but if I have to try to push a square peg through a round hole like I did in this post, then I would have to say that being RESTful probably isn&#8217;t worth the price&#8211;and I don&#8217;t think that&#8217;s such a terrible thing. I would rather use Django&#8217;s very nice url &#8211;> view approach as it was intended and focus on making a functional application for end users (and do so very quickly and easily) rather than a fully RESTful application that makes me feel good as a system designer.</p>
<p>(Of course, I still can&#8217;t help but feel that what I tried to do might be done better by a more experienced Django developer, so I haven&#8217;t closed myself off to the possibility of being more fully RESTful in Django as it is today.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David, biologeek</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-76</link>
		<dc:creator>David, biologeek</dc:creator>
		<pubDate>Thu, 01 Mar 2007 21:49:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-76</guid>
		<description>Really intersting post/blog. I'm interested in both django and REST too and I've got the same conclusion, while REST isn't well supported by django itself, semi-RESTful approach looks a lot easier.

I hope the situation will change sooner than later...
http://code.djangoproject.com/wiki/FeatureGrouping#Webservices

ps : you can factorise your URLs with 'tagging_exploration.tagging.views.' + model.__name__ as first argument of patterns().</description>
		<content:encoded><![CDATA[<p>Really intersting post/blog. I&#8217;m interested in both django and REST too and I&#8217;ve got the same conclusion, while REST isn&#8217;t well supported by django itself, semi-RESTful approach looks a lot easier.</p>
<p>I hope the situation will change sooner than later&#8230;<br />
<a href="http://code.djangoproject.com/wiki/FeatureGrouping#Webservices" rel="nofollow">http://code.djangoproject.com/wiki/FeatureGrouping#Webservices</a></p>
<p>ps : you can factorise your URLs with &#8216;tagging_exploration.tagging.views.&#8217; + model.__name__ as first argument of patterns().</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stonemind</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-74</link>
		<dc:creator>stonemind</dc:creator>
		<pubDate>Thu, 01 Mar 2007 15:40:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-74</guid>
		<description>Thanks for the clarification on the Savage post. I had a feeling I must have been reading it wrong, because the rest of his post seemed so dead-on. For those who are too tired from reading this long post to follow the link, the line from the Charlie Savage I was referring to was:
  'If you need to use PUT and DELETE in forms, then sadly you'll have to add an action parameter to the URL like this - "action=put."'</description>
		<content:encoded><![CDATA[<p>Thanks for the clarification on the Savage post. I had a feeling I must have been reading it wrong, because the rest of his post seemed so dead-on. For those who are too tired from reading this long post to follow the link, the line from the Charlie Savage I was referring to was:<br />
  &#8216;If you need to use PUT and DELETE in forms, then sadly you&#8217;ll have to add an action parameter to the URL like this - &#8220;action=put.&#8221;&#8216;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Williams</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-73</link>
		<dc:creator>Peter Williams</dc:creator>
		<pubDate>Thu, 01 Mar 2007 15:23:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-73</guid>
		<description>&lt;blockquote&gt;That is, right up to the point where he seems to suggest putting â€œaction=putâ€ in the URL of a GET request.&lt;/blockquote&gt;

The most important thing about GET requests is that they have no side
effects.  So you are correct to balk that the idea of simulating PUTs
using GET.  However, you misinterpreted what Mr Savage was saying.  I
know him and he would NEVER suggest putting something like
"action=put" on a GET. :)  

What he was saying is, by adding "action=put" to a POST request you
can effectively simulate the PUT and DELETE HTTP methods.  POST are
expected to have side effects so user agents and intermediates treat
them with the appropriate care and the exact semantics of POST in HTTP
are pretty vague so having an POST behave like a PUT or DELETE is not
illegal.

This approach is significantly cleaner, from a RESTful architecture
standpoint, than introducing new create, update and delete URIs.
Those addition URIs are not resources, at all, but rather operations,
or methods, on their parent resource.</description>
		<content:encoded><![CDATA[<blockquote><p>That is, right up to the point where he seems to suggest putting â€œaction=putâ€ in the URL of a GET request.</p></blockquote>
<p>The most important thing about GET requests is that they have no side<br />
effects.  So you are correct to balk that the idea of simulating PUTs<br />
using GET.  However, you misinterpreted what Mr Savage was saying.  I<br />
know him and he would NEVER suggest putting something like<br />
&#8220;action=put&#8221; on a GET. <img src='http://www.stonemind.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>What he was saying is, by adding &#8220;action=put&#8221; to a POST request you<br />
can effectively simulate the PUT and DELETE HTTP methods.  POST are<br />
expected to have side effects so user agents and intermediates treat<br />
them with the appropriate care and the exact semantics of POST in HTTP<br />
are pretty vague so having an POST behave like a PUT or DELETE is not<br />
illegal.</p>
<p>This approach is significantly cleaner, from a RESTful architecture<br />
standpoint, than introducing new create, update and delete URIs.<br />
Those addition URIs are not resources, at all, but rather operations,<br />
or methods, on their parent resource.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stonemind</title>
		<link>http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-72</link>
		<dc:creator>stonemind</dc:creator>
		<pubDate>Thu, 01 Mar 2007 14:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.stonemind.net/blog/2007/03/01/toward-a-restful-approach-to-django-applications/#comment-72</guid>
		<description>OK, I just saw this pop up on DZone after I posted there, and I am particularly impressed with the tutorial it links to near the bottom entitled "RESTful Rails Development":
http://www.railsonwave.com/railsonwave/2007/3/1/howto-create-a-new-action-with-a-resource</description>
		<content:encoded><![CDATA[<p>OK, I just saw this pop up on DZone after I posted there, and I am particularly impressed with the tutorial it links to near the bottom entitled &#8220;RESTful Rails Development&#8221;:<br />
<a href="http://www.railsonwave.com/railsonwave/2007/3/1/howto-create-a-new-action-with-a-resource" rel="nofollow">http://www.railsonwave.com/railsonwave/2007/3/1/howto-create-a-new-action-with-a-resource</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>
