My Atom Feed

[Valid Atom]

I decided to create an Atom feed. I have no idea why really... I figured there must be some advantage to having one right? I mean, Blogger is using them and it's been, what? A year into the process? But believe it or not, it's still not particularly easy to get even a feed up and running. I thought it was the API that wasn't ready for prime time... but even the feed is just way more trouble than it seems.

There's *way* more ways to format an Atom feed than there should be - every Atom-enabled site I went to for examples seemed to put stuff in different places and used different attributes on standard elements. I examined the simple feed and the maximal feed, checked out Blogger's feeds and then explored some other other Atom-sites out there like O'Reilly blogs and some of the head Atomers. Sam Ruby, by the way, doesn't actually have an Atom feed that I can find. Anyways, after seeing all the different variations I set about creating my own unique blend of atom:elements.

First, I just have to say that it took me all of 10 minutes to create a valid RSS 2.0 feed. Two of them, in fact, one for my main blog and one for the comments. But Atom took me over an hour for some reason. Atom's tags just don't seem to make a lot of sense - there's really no internal theme in the XML. It seems if they're going to use things from XHTML like the link tag, and since the main content for Atom feeds is XHTML-based news and weblogs, it seems like it should look *a lot* more like XHTML. I mean, links have href attributes, but generator has a url attribute instead. And I don't like the fact that link tags are used for everything under the sun. Yes, I get the idea that these are links to other resources... okay. But having them all be the same tag is confusing.

Yet despite the flexibility of all those tags and various attributes, there doesn't seem to be a standard place to put the image of my blog. I like the fact that Bloglines and other aggregators use the logos linked from RSS. It helps me remember where the articles are coming from. Also, there doesn't seem to be any obvious place for a comments link. Again, Bloglines shows that prominently at the bottom of each post and keeps me as the feed writer from having to include it in the content itself.

Producing a valid feed was the main pain because I'm using Java. Because the SimpleDateFormat class which JSTL uses produces a timezone formatted like this: -0700 and Atom (or the W3C, who ever you want to blame) wants them like this: -07:00, the validator barfed at me. So after mucking with it for an hour, I finally gave up and threw a Z at the end instead. This means that my times are off by like 7 hours. I'll fix that, but right now I'm sick of messing with it. And what's the difference between issued and created again? I've been subscribed to the Atom mailing list for three months and I still don't know the answer to that one. And do you really need three different elements for what is essentially a date? If all url elements are links, aren't all date elements just dates?

The other problem is that the Feed Validator is wrong. It demanded that I put in a MIME type for my link elements. The spec says that you "may" put a MIME type in the links and I don't want to bother. But the validator didn't like them not being there. The whole "mode" vs "type" doesn't seem particularly elegant either. I know it's a hack to allow the aggregators to better guess how to get at the content of the feed... okay. Hey, if it works, right? But I really wonder, if the RSS guys simply added those tags to the item elements in their spec, I think that would almost obviate the need for Atom feeds all together.

I mean, I'm as much in favor for détente as the next guy, just someone needs to really prove to me that my last hour or so messing with that spec was worth it.


< Previous         Next >