Ruby: Atom
Filed in: XML2003, Fri, Dec 12 2003 17:30 PT
I joined the session 10 minutes late after answering a question as I walked out of my session.
Core model
Dave Winer has said recently that links should point to solid URIs based off of the top-level domain. Ruby says, why not just use the existing link element in HTML? Start, previous and next, etc., are standard, and link is extensible.
RSS 2.0’s guid and RSS 1.0’s item seem to work everywhere. In Atom, it must be a URI, but not a URL (i.e., not an http:)
Descriptions: Sam, like Tim Bray, is frustrated with the informality in RSS 2.0. Markup often contains relative URLs. Fixes have been sketchy. So Atom will adopt xml:base. A number of blogging tools put the full content of the blog entry in the element. Atom’s solution is to split things into summary and content elements. Content is not supposed to be markup (i.e., only plain text) unless denoted as “encoded”.
Syndication
author: RSS 2.0 says the author’s email address must be there. Some people don’t like that. Atom uses dc.creator, which has name, email, address.
Dates: Issued date, last modified, and initial creation date (optional)
Extensibility: Atom is extensible by namespace, or by linking to data.
Ruby had a scenario involving events. Somebody you know mentions they’re going to a conference. Wouldn’t it be nice to add that info to your calendar? A solution is to point to vCal with: <atom:link type=”text/calendar” href=”…”>
Required elements: id and modified. That’s it.
Bandwidth is a problem. It’s possible that one could use link to point to the alternate content, to help alleviate repetitive downloading of the same content.
APIs
Approached in “a RESTful fashion.” POST, GET, PUT, and DELETE. SOAP is optional, and has the same functionality. There is a way to use POST and GET to emulate the PUT and DELETE features missing in non-HTTP/1.1 servers. Resources are identified like: <atom:link rel=”service.post” href=”…”>, etc.
Summary: Content is a rich source of metadata. Clients should be able to rely on required elements, and escaping and markup should be okay, if (emphasis his) it’s annotated. And links are cool.
The moderator asked how to find the feed from an arbitrary Web site. Ruby said Mark Pilgrim suggested the link element. Dare Obasanjo talked about his RSS Bandit which he uses for discovery of RSS. It starts with the link, then scans the links for something with “rss” in it. Failing that, he looks to Syndic8.
Ruby says (in response to a question from W3C’s Martin Dürst) that his biggest problem with using RDF in this space is that it “ignores the fact that the most interesting data is (not in metadata but) in your data.” He says he and Pilgrim started with Atom as a list of best practices for RSS, but RSS has been “resistant” to change, so Atom-the-format was born.
