<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: JSON-RPC WebOb Example</title>
	<link>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/</link>
	<description></description>
	<pubDate>Mon, 01 Dec 2008 20:26:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>

	<item>
		<title>By: Ian Bicking</title>
		<link>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16622</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Wed, 09 Apr 2008 16:07:10 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16622</guid>
		<description>Sam: a more RESTful API would be one where the method is determined by the URL, and then the arguments are POSTed to that URL.  (Using states that are PUT/GET from a URL would be better, but at least identifying the actor with the URL is an improvement).

Even doing something like `/RPC?method=add` is more RESTful than what JSON-RPC is doing.

OHM is a library I wrote to make exposing a single object easier: http://pythonpaste.org/ohm/</description>
		<content:encoded><![CDATA[<p>Sam: a more RESTful API would be one where the method is determined by the URL, and then the arguments are POSTed to that URL.  (Using states that are PUT/GET from a URL would be better, but at least identifying the actor with the URL is an improvement).</p>

<p>Even doing something like <code>/RPC?method=add</code> is more RESTful than what JSON-RPC is doing.</p>

<p>OHM is a library I wrote to make exposing a single object easier: <a href="http://pythonpaste.org/ohm/" rel="nofollow">http://pythonpaste.org/ohm/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16616</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Wed, 09 Apr 2008 13:39:24 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16616</guid>
		<description>Ian....

Your json-rpc example is very appreciated.  But you state "In fact I don't like JSON-RPC. It's unnecessarily un-RESTful, and modelled too closely on XML-RPC."

Can we get an example that is restful?

Thanks</description>
		<content:encoded><![CDATA[<p>Ian&#8230;.</p>

<p>Your json-rpc example is very appreciated.  But you state &#8220;In fact I don&#8217;t like JSON-RPC. It&#8217;s unnecessarily un-RESTful, and modelled too closely on XML-RPC.&#8221;</p>

<p>Can we get an example that is restful?</p>

<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry Fuecks</title>
		<link>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16557</link>
		<dc:creator>Harry Fuecks</dc:creator>
		<pubDate>Fri, 04 Apr 2008 07:06:42 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16557</guid>
		<description>Thanks</description>
		<content:encoded><![CDATA[<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amk</title>
		<link>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16542</link>
		<dc:creator>amk</dc:creator>
		<pubDate>Thu, 03 Apr 2008 18:39:56 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16542</guid>
		<description>One problem might be that the docs for wsgiref (http://docs.python.org/dev/library/wsgiref.html) don't have an introductory section that writes a small server.  Instead, there are 4 paragraphs of general overview and a link to wsgi.org, then it describes wsgiref.util
and .headers, which are pretty low-level and boring.    

There's an example in the last section, but that's very far down; someone skipping through the library reference won't read down that far.  BaseHTTPServer's docs, on the other hand, have an example in the opening section.</description>
		<content:encoded><![CDATA[<p>One problem might be that the docs for wsgiref (http://docs.python.org/dev/library/wsgiref.html) don&#8217;t have an introductory section that writes a small server.  Instead, there are 4 paragraphs of general overview and a link to wsgi.org, then it describes wsgiref.util
and .headers, which are pretty low-level and boring.    </p>

<p>There&#8217;s an example in the last section, but that&#8217;s very far down; someone skipping through the library reference won&#8217;t read down that far.  BaseHTTPServer&#8217;s docs, on the other hand, have an example in the opening section.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ian Bicking</title>
		<link>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16539</link>
		<dc:creator>Ian Bicking</dc:creator>
		<pubDate>Thu, 03 Apr 2008 15:25:23 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16539</guid>
		<description>It will generally be easier to write to straight WSGI (not using WebOb) than to write to BaseHTTPServer.  And wsgiref.simple_server is in the standard library.  In Python 2.4 you'll still have to install it, of course.

As to equivalents: wsgiref.simple_server is really the equivalent to BaseHTTPServer.  You could write this without using WebOb, and I think it would still be simpler.  BaseHTTPServer kind of has a weird little framework in it, which confuses things a bit -- but that's part of why you should use WSGI, where these different things are not confused.  With WSGI, servers serve, and they don't do anything else.  They don't dispatch, they don't look at the request method, they don't do any of that.</description>
		<content:encoded><![CDATA[<p>It will generally be easier to write to straight WSGI (not using WebOb) than to write to BaseHTTPServer.  And wsgiref.simple_server is in the standard library.  In Python 2.4 you&#8217;ll still have to install it, of course.</p>

<p>As to equivalents: wsgiref.simple_server is really the equivalent to BaseHTTPServer.  You could write this without using WebOb, and I think it would still be simpler.  BaseHTTPServer kind of has a weird little framework in it, which confuses things a bit &#8212; but that&#8217;s part of why you should use WSGI, where these different things are not confused.  With WSGI, servers serve, and they don&#8217;t do anything else.  They don&#8217;t dispatch, they don&#8217;t look at the request method, they don&#8217;t do any of that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Harry Fuecks</title>
		<link>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16519</link>
		<dc:creator>Harry Fuecks</dc:creator>
		<pubDate>Thu, 03 Apr 2008 10:01:23 +0000</pubDate>
		<guid>http://blog.ianbicking.org/2008/04/02/json-rpc-webob-example/#comment-16519</guid>
		<description>Thanks for doing the tutorial - that's a big help.

"I don’t know why people keep writing these"

As someone recently guilty of writing a new RESTful "microapp" using BaseHTTPServer, some reasons;

- a: Don't have the big picture yet of all that wsgi means to me as someone wishing write RESTful microapps (vs. e.g. someone writing frameworks)
- b: Seen in a certain light, wsgi represents have choices and making decisions - a paradox of choice thing
- c: BaseHTTPServer has the advantage of batteries included
- d: Red Hat only recently bumped up to python 2.4...
- e: I was aware of my sin ( but lacked time to figure out how not to be a sinner

If you still have some drive to write on this topic, in particular, for point b, some kind of decision tree would really help. E.g. WebOb - is that the recommended "equivalent" to BaseHTTPServer?</description>
		<content:encoded><![CDATA[<p>Thanks for doing the tutorial - that&#8217;s a big help.</p>

<p>&#8220;I don’t know why people keep writing these&#8221;</p>

<p>As someone recently guilty of writing a new RESTful &#8220;microapp&#8221; using BaseHTTPServer, some reasons;</p>

<ul>
<li>a: Don&#8217;t have the big picture yet of all that wsgi means to me as someone wishing write RESTful microapps (vs. e.g. someone writing frameworks)</li>
<li>b: Seen in a certain light, wsgi represents have choices and making decisions - a paradox of choice thing</li>
<li>c: BaseHTTPServer has the advantage of batteries included</li>
<li>d: Red Hat only recently bumped up to python 2.4&#8230;</li>
<li>e: I was aware of my sin ( but lacked time to figure out how not to be a sinner</li>
</ul>

<p>If you still have some drive to write on this topic, in particular, for point b, some kind of decision tree would really help. E.g. WebOb - is that the recommended &#8220;equivalent&#8221; to BaseHTTPServer?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
