Cook Computing

Amateurish Blogging APIs

March 1, 2003 Written by Charles Cook

Chris Double commented on my last entry, asking why I think the current weblogging APIs are amateurish. Brad Wilson added another comment suggesting that the poor documentation and lack of nonASCII support are the problems. Here are the reasons for my opinion.

I find it amateurish that it is difficult to determine exactly what is supported by these APIs. Just because something is designed for a scripting environment (the often touted reason why typing in XML-RPC APIs can sometimes be vague) doesn't mean it has to be imprecisely defined or not defined at all.

I find it amateurish that the blogging APIs do not take account of the fact that XML-RPC, according to its spec, does not support non-ASCII characters in string values. Does Dave Winer, the inventor of XML-RPC, expect people to limit their blog entries to US-ASCII characters when using MetaWeblog? If he does, then MetaWeblog is a crippled API. If he doesnt, what is the XML-RPC spec worth? The professional approach here would be to encode strings in some way which was valid according to the XML-RPC spec, for example using the base64 XML-RPC type. (Or work on a way of transitioning XML-RPC to full Unicode support, but that is another story.)

I find it amateurish that as soon as I tried to develop a blogging client I came across omissions from the APIs. For example I wanted to be able to work offline, creating new entries and editing existing entries, and then resolving any conflicts with the server when I went back online. But there is no way of determining which entries have changed on the server since the client last connected to it. The only solution is to use brute force and download every entry and check its content against the locally cached data. Not very elegant. Similarly I wanted to know whether entries have been published since the client last connected. It is not clear how I can achieve this even if I download all the entries associated with the blog. These are the sort of requirements that any professional developer would have identified very quickly on doing some analysis, for example using Use Case scenarios.

I find it amateurish that the type of the postid item changes from API to API and from implemention to implementation. For example the MetaWeblog RFC suggests it should be a string but when you look at the sample request it is an integer.

I find it amateurish that there seems to be confusion as to what the description field is used for in MetaWeblog. According to the MetaWeblog RFC this field is designed to hold what the Blogger API describes as "content" but, also according to the RFC, description is taken from the RSS 2.0 spec where it is described as "The item synopsis". Movable Type addresses this confusion by adding a new item called mt_excerpt.