<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Fischer dot Name &#187; xml</title>
	<atom:link href="http://www.davidfischer.name/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davidfischer.name</link>
	<description>Some Things to Some People</description>
	<lastBuildDate>Thu, 15 Jul 2010 21:05:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>First Version of RPC4Django</title>
		<link>http://www.davidfischer.name/2009/07/first-version-of-rpc4django/</link>
		<comments>http://www.davidfischer.name/2009/07/first-version-of-rpc4django/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 05:36:30 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.davidfischer.name/?p=90</guid>
		<description><![CDATA[The first version of my]]></description>
			<content:encoded><![CDATA[<p>The first version of my unified xmlrpc and jsonrpc server is <a href='http://www.davidfischer.name/rpc4django'>available</a>. Go get it!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidfischer.name/2009/07/first-version-of-rpc4django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unified XML and JSON RPC Dispatcher for Django</title>
		<link>http://www.davidfischer.name/2009/06/unified-xml-and-json-rpc-dispatcher-for-django/</link>
		<comments>http://www.davidfischer.name/2009/06/unified-xml-and-json-rpc-dispatcher-for-django/#comments</comments>
		<pubDate>Fri, 26 Jun 2009 15:06:21 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.davidfischer.name/?p=65</guid>
		<description><![CDATA[After looking around at the]]></description>
			<content:encoded><![CDATA[<p>After looking around at the rpc <a href="https://launchpad.net/django-xmlrpc">support</a> available in Django, I think I will create and distribute my own application. Here are the goals:</p>
<ol>
<li>Complete xml and json rpc support</li>
<li>Easy identification of rpc methods by a decorator</li>
<li>Customizable documentation (which is absent from DocXMLRPCServer)</li>
<li>Support rpc introspection</li>
<li>Support for method signatures (which is absent from SimpleXMLRPCServer)</li>
<li>Easy installation and integration into Django projects</li>
<li>Licensed properly for open source or commercial software</li>
</ol>
<p>Updates to come. I&#8217;m off to San Francisco for a weekend of fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.davidfischer.name/2009/06/unified-xml-and-json-rpc-dispatcher-for-django/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django with JsonRPC and XMLRPC</title>
		<link>http://www.davidfischer.name/2009/06/django-with-jsonrpc-and-xmlrpc/</link>
		<comments>http://www.davidfischer.name/2009/06/django-with-jsonrpc-and-xmlrpc/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 18:56:35 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.davidfischer.name/?p=31</guid>
		<description><![CDATA[[Edit: take a look at]]></description>
			<content:encoded><![CDATA[<p>[Edit: take a look at <a href="http://www.davidfischer.name/rpc4django/">RPC4Django</a> for a JSONRPC and XMLRPC server for Django]</p>
<p>I corresponded recently with a developer working on a Django-powered <a href="http://code.djangoproject.com/wiki/Jsonrpc" target="_self">jsonrpc</a> library. In the past, I have done some work on web applications that require good external interfaces. In some cases, however, it makes sense to make the same methods available via both jsonrpc and <a href="http://code.djangoproject.com/wiki/XML-RPC">xmlrpc</a>.</p>
<p>For javascript and flash, json makes a lot of sense. For communication between client side and server side, jsonrpc works very well since json is natively supported and speed can be more of a factor in presentation. However, if external interfaces are also going to interact with your API, jsonrpc is not as well supported as xmlrpc. Virtually every language has good libraries for xmlrpc. For this reason, it makes good sense to combine the two and make the same methods available to both.</p>
<pre><code class="python">import logging
from SimpleXMLRPCServer import SimpleXMLRPCDispatcher
from django.http import HttpResponse, Http404
from jsonrpc import JsonRpc

xmlrpcdispatcher = SimpleXMLRPCDispatcher(allow_none=False, encoding=None)
jsonrpcdispatcher = JsonRpc()
# ... register methods with xmlrpc and jsonrpc

def rpc_handler(request):
    if request.META['CONTENT_TYPE'] == 'application/json':
        response = jsonrpcdispatcher.handle_request(request)
    elif request.META['CONTENT_TYPE'] == 'text/xml':
        response = HttpResponse()
        response.write(xmlrpcdispatcher._marshaled_dispatch(request.raw_post_data))
        response['Content-length'] = str(len(response.content))
    else:
        # display documentation, or just raise a 404
        logging.debug('rpc request type: %s' %request.META['CONTENT_TYPE'])
        raise Http404

    return response
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.davidfischer.name/2009/06/django-with-jsonrpc-and-xmlrpc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
