« Dive into Python...... | Main | XML on the Web Has... »

Atom in a Nutshell (as of Atom API 0.9)

I've been working to learn Atom as quickly as possible and so I've been reading the developing format and API specifications, following the mailing list, watching the issues list and experimenting with Atom4J and the Blogger.com Atom API implementations. Atom is pretty simple, so I'm going to take a stab at explaining it in a couple of paragraphs. To follow this explanation, you'll need to have a basic understanding of the Web including both HTTP and XML.

Atom is a new standard for publishing on the Web. Atom defines both a data format for Web publishing and a protocol for interacting with a Web publishing system, such as a Weblog server, a Wiki, or a Content Management System.

The Atom format is an XML based format. A file that is formatted according to the Atom Format specification is known as an Atom feed. The top-level XML element is <feed>. An Atom feed is made up of a collection of Atom entries, represented as XML <entry> elements. Each entry has a title, a summary, text content, and other attributes. FYI, an Atom formatted file must be served as application/atom+xml or it won't work.

The Atom API, a Web services protocol, is defined in terms of HTTP URIs and HTTP verbs such as GET, PUT, POST, and DELETE. The Atom API specification defines three classes of URIs: Feed URI, Post URI, and Edit URI.

A Feed URI provides a way to get Atom entries. If you do a GET on a Feed URI, you will receive an Atom feed. If the server knows who you are, this Atom feed may contains a series of <link> elements, just like the ones in HTML, that point to the Feed URIs for each of the Blogs, or Wiki namespaces or Content Management document collections, that you are allowed to edit. If the server knows which Blog you are requesting, then the Atom feed will contain the latest entries from that Blog. In that case, the feed will also contain the Post URI for the Blog, Feed URI for fetching the next and previous batch of entries, and each entry will contain an Edit URI for editing that entry.

A Post URI provides a way to create new entries on a server. You create a new entry by using an HTTP POST to write the that entry to the server as an XML <entry> element.

An Edit URI provides a way to edit an entry on a server. To get a specific entry, you do a GET on the Edit URI for that entry. To update an entry, you POST the <entry> XML representation of that entry to the Edit URI for that entry. To delete an entry you do a DELETE on the entry's Edit URI. The use of the PUT and DELETE verbs is problematic for some devices with limited HTTP support and a workaround is being sought.

Currently, authentication is done via WSSE and each Atom API request must carry an HTTP header that contains a valid WSSE token. Mark Pilgrim explained this in his XML.com column and Claud Montpetit illustrated it with a nice and concise Java example. However, WSSE seems to have fallen out of favor and may not be included in a future version of the spec.

Did I get something wrong? Please correct me. Leave a comment.

Comments:

The "Atom API" is now called the Atom Publishing Protocol. http://bitworking.org/projects/atom/

Posted by Robert Sayre on July 21, 2004 at 02:08 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed

« Dive into Python...... | Main | XML on the Web Has... »

Welcome

This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog

Related entries

Below are the most recent entries in the category Blogging, some may be related to this entry.