P@ Sunglasses

« test blogplanet | Main | Open Source Get... »

20040920 e hënë shtator 20, 2004

A quick history of the weblog posting APIs

A little history and explanation of the various weblog posting APIs.

Please feel free to correct me: I've taken the blogging train only in 2002 and have not lived through all the history of this evolution, so some facts stated here may be wrong.

XML-RPC is a 1998 spec by Userland's Dave Winer for RPC in his proprietary content management tool Frontier.
Then Winer worked with Microsoft to spec out SOAP.

In the meantime as blogging got more successful the blogging crowd wanted an API to post to a blog from a client or server tool, wihtout using a HTML form.

1. Blogger API

Blogger shot first, 8/7/2001,with the Blogger API , a very simple API based on XML-RPC.
Its methods are very simple and limited: get and set some weblog texts.

blogger.newPost: Makes a new post to a designated blog. Optionally, will publish the blog after making the post.

blogger.editPost: Edits a given post. Optionally, will publish the blog after making the edit.

blogger.getUsersBlogs: Returns information on all the blogs a given user is a member of.

blogger.getUserInfo: Authenticates a user and returns basic user info (name, email, userid, etc.).

blogger.getTemplate: Returns the main or archive index template of a given blog.

blogger.setTemplate: Edits the main or archive index template of a given blog.

2. MetaWeblog API

Then in 3/14/2002 Userland's Dave Winer published the MetaWeblog API, still based on XML-RPC, to address the blogger API shortcomings: from the "spec"

Relationship between MetaWeblog API and the Blogger API

The MetaWeblog API is designed to enhance the Blogger API, which was limited in that it could only get and set the text of weblog posts. By the time MWA was introduced, in spring 2002, many weblog tools had more data stored with each post, and without an API that understood the extra data, content creation and editing tools could not access the data.

At the time of this writing, summer 2003, most popular weblog tools and editors support both the Blogger API and the MetaWeblog API.

Relationship between MetaWeblog API and RSS 2.0

The MetaWeblog API uses an XML-RPC struct to represent a weblog post. Rather than invent a new vocabulary for the metadata of a weblog post, we use the vocabulary for an item in RSS 2.0. So you can refer to a post's title, link and description; or its author, comments, enclosure, guid, etc using the already-familiar names given to those elements in RSS 2.0. Further since RSS 2.0 is extensible, so is the MetaWeblog API. We have designed conventions for representing attributes and namespaces in MWA.

This API was successful and is implemented in most weblog servers (Movable Type, Roller) and clients (Ecto, NetNewsWire Pro).
The main long term additions concern getting recent posts, attaching media files to a post, setting and retrieving categories, and extensibility (sending attributes for post elements, and using namespaces).
But it is tied to RSS 2.0.

David Czarnecki's first comment to this post outlines the variety of ways this spec can be implemented on client or servers, making the use of this spec very experimental: just try a combination of client and server and cross your fingers to see if it will work.

3. Atom

Then in early 2003 Sam Ruby, the intertwingled one (from Apache/IBM), tired of the endless fights between RSS 1.0 and 2.0, started the Atom project (initially Echo) to define a new standard for syndication, including extensibility and APIs.

The spec was designed collaboratively on the Atom Wiki. Tim Bray participated into that, as well as most blogland except Dave Winer who was pushing for RSS 2.0. In spring 2004 Sam Ruby proposed to submit it at the IETF as a standard. The standardization work is in process now and should be finished by the beginning of 2005.

The Atom API follows the REST architectural style (GET, PUT, DELETE, POST) with an option to use SOAP.
It generated a lot of noise and disputes in the blogging community.

Although I did not participate directly, I am personnaly very much in favor of it: I seems like it will be a "real" specification, and its design last time I looked was pretty clean. The problem with the Meta Weblog API is that the specification is open to interpretation and very often clients and servers implement it either incorrectly or using different interpretations, resulting half working solutions and strange error messages. Atom should be more strict, so more straightforward to validate, yielding better interoperability.

It is quite recent and is not implemented in all servers yet, but I'm sure it will. Movable Type supports it, and Google recently chose it for their feeds (Google acquired blogger last year). However when people say they support it, it usually means for generating feeds, not for the publishing API (Movable Type 3.0 implements the Atom API draft). But that will come in due time.
Dave Winer must have felt that because in april he offered the olive branch to try to make RSS 2.0 and Atom converge.

Conclusion for blogs.sun.com

Roller today implements part of the Meta Weblog API (not the newMedia() method so you cannot post pictures), so this is what you need your weblog client to use if you want to post to blogs.sun.com. The code for the Meta Weblog API in Roller comes from David Czarnecki's Blojsom (another nice weblog server in java, that was included in Mac OS X 10.4 server last june) and his latest version includes the newMedia() implementation. We just need to push it in Roller.

Dave Johnson plans to add support for Atom API in Roller. It will probably be based on Lance Lavandowska's Atom4J project.

References

As usual Mark Pilgrim has the best writeup on this topic: The Atom API

The Roller Wiki has a good set of links for further reading on the topic: WeblogAPIs.

( Sht 20 2004, 04:08:05 MD PDT ) Permalink Comments [9] Chat about it Technorati cosmos Tagsurf It

Comments:

Aside from extensibility in the MetaWeblog API which I don't think I can address, to be complete, you also need to add the following methods to the MetaWeblog API. I know WordPress and blojsom both provide implementations for these methods. <p/> http://www.xmlrpc.com/stories/storyReader$2460 <p/> I've seen some blog software packages which extend the Blogger API to get those methods into their implementation of the MetaWeblog API. This is wrong. Those method calls, in the URL above, start with metaWeblog. Therefore, the XML-RPC calls are different. However, it should be trivial to have the MetaWeblog API implementation class extend a Blogger API class and just dispatch to the Blogger API methods in those MetaWeblog API methods. <p/> Also, for categories, the MetaWeblog API does mention how these should be handled. "For categories, pass an array of strings of names of categories that the post belongs to, named categories. On the server side, it's not an error if the category doesn't exist, only record categories for ones that do exist." So, in the struct that gets passed to newPost or editPost, look for the "categories" element, and, if available, take the appropriate action. I know clients like ecto (OS X) send this in the struct.

Posted by David Czarnecki on shtator 20, 2004 at 05:48 MD PDT #

Just a note: Dave Winer is a nutcase, which is probably the main reason that other specs are gaining ground. His unwillingness to work with others and his jealousy over certain pieces of his design guaranteed that others would come up with a different spec and go with that, instead.

Posted by PatrickG on shtator 20, 2004 at 06:09 MD PDT #

Roller actually implements both the BloggerAPI and the MetaWeblogAPI - probably both borrowed from Blojsom. The classes have been refactored a couple times so I don't know how much they resemble the original Blojsom code.

Also, Roller has supported Atom (using Atom4J) for nearly a year now. However it has stayed very much in an 'alpha' quality due to: lack of interest and the Atom spec-flux. I don't want to spend too much effort on it until Atom firms up some more (the time is coming soon).

Posted by Lance Lavandowska on shtator 21, 2004 at 07:19 PD PDT #

Thanks David, I updated the post regarding the Meta Weblog API according to your additional information.

PatrickG I am aware of the polemics raised by Dave Winer's personality but I won't comment on that since I never worked with him. From a factual historical perspective I think he had a significant role in shaping Weblog and RSS technologies and helping them become popular. I was at Netscape when AOL started getting disinterested in RSS because it had brought MyNetscape all the eyeballs it needed (my team used to maintain the fetcher:-). Dave's colorful character may be what was needed in these early days to get apps out and raise the excitement level. Sam Ruby and Tim Bray's more rational and collaborative demeanor are what is needed that to get an IETF standard for this space.

Lance thanks, I did not know that it was already in there: I can't find it in the code? I looked at the code for 0.9.8.2, which is what we use now. I also looked at the wiki and there is no documentation about that. Do you have some urls to share?

Posted by Patrick Chanezon on shtator 21, 2004 at 09:17 PD PDT #

This helps :-).

Posted by Maneesha jain on shtator 21, 2004 at 11:08 PD PDT #

The principle class is in cvs at <https://roller.dev.java.net/source/browse/roller/roller/src/org/roller/presentation/atom/RollerAtomServlet.java>

Posted by Lance Lavandowska on shtator 21, 2004 at 02:21 MD PDT #

Argh: here

Posted by Lance Lavandowska on shtator 21, 2004 at 02:22 MD PDT #

Thanks Lance. I guess it will be in 0.9.9 but it is not in 0.9.8.2 that we're running now on blogs.sun.com. I'll check out the whole stuff fresh from CVS.

Posted by Patrick Chanezon on shtator 22, 2004 at 12:06 MD PDT #

Good reading Maneesha: welcome to the syndication world:-)

Posted by Patrick Chanezon on shtator 22, 2004 at 12:08 MD PDT #

Post a Comment:

Comments are closed for this entry.

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.