I’ve just submitted a patch to the DojoX project for a dojo.data data store that can read Atom XML documents. It’s relatively simple for the moment, but is capable of taking an XML document that conforms to the Atom spec, and returning the entries using the dojo.data.Read API.
Update: this has now been committed to the DojoX project.
This arose out a desire to rewrite the page on my personal website that mirrors this blog. At time of writing, that has a strong dependency on PHP to query my blog for the Atom feed, parse the feed, and output it using a server side HTML template.
This is of course be easily achievable on the browser also, except for the fetching of the XML document from the remote website which the server would still have to do. Of course, if the Atom URL is on the same server as the page, even this dependency could be removed, and all the work, from the fetching, parsing and templating, could be done on the browser.
However, implementing this as a Dojo data store has many advantages, the primary one being that I get to play with integrating a Dojo data store with the very very cool Django templating language package in DojoX, dojox.dtl. Alex recently checked in a patch to dojox.dtl that enables the use of dojo.data stores directly in templates, so I can’t wait to get this checked in (once any issues Jared has with it are satisfied) and get going on my site!
Share this post:digg it|kick it|Email it|bookmark it|reddit|liveIt