Atom

Web-Based Publishing (INFO 290-19)

Erik Wilde, UC Berkeley School of Information
2007-04-12
Creative Commons License

This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 2.5 License.

Abstract

While RSS-based syndication has become widely used (in particular for user-generated content), the technical and political problems of the format triggered a new development. The Atom format is an improved syndication format, and accompanied by the Atom Publishing Protocol (APP), a REST-based way of interacting with an Atom source. APP includes support for creating, reading, updating, and deleting Atom entries, thus supporting a broad range of resource-centered interactions.

Outline (RSS Problems)

  1. RSS Problems [2]
  2. Atom Format [7]
  3. Atom Publishing Protocol (APP) [8]
  4. APP for AJAXLink [2]
  5. Conclusions [1]

Technical Problems

Political Problems

Outline (Atom Format)

  1. RSS Problems [2]
  2. Atom Format [7]
  3. Atom Publishing Protocol (APP) [8]
  4. APP for AJAXLink [2]
  5. Conclusions [1]

Atom History

Atom vs. RSS

Atom Example

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us">
 <title>ongoing</title>
 <id>http://www.tbray.org/ongoing/</id>
 <link rel='self' href="http://www.tbray.org/ongoing/ongoing.atom"/>
 <updated>2007-04-11T12:55:09-07:00</updated>
 <author>
  <name>Tim Bray</name>
 </author>
 <subtitle>ongoing fragmented essay by Tim Bray</subtitle>
 <entry xml:base="When/200x/2007/04/02/">
  <title>Atom Publishing Protocol  Interop!</title>
  <id>http://www.tbray.org/ongoing/When/200x/2007/04/02/APP-Interop</id>
  <published>2007-04-02T13:00:00-07:00</published>
  <updated>2007-04-10T14:24:00-07:00</updated>
  <category scheme="http://www.tbray.org/ongoing/What/" term="Technology/Atom"/>
  <category scheme="http://www.tbray.org/ongoing/What/" term="Technology"/>
  <category scheme="http://www.tbray.org/ongoing/What/" term="Atom"/>
  <content type="xhtml">
   <div xmlns="http://www.w3.org/1999/xhtml">
    <p>Mark your calendar: <a href="http://www.intertwingly.net/wiki/pie/April2007Interop">April 16-17 at Google</a>. <em>Everybody</em> is invited, provided they bring along an APP implementation, client or server. This was just announced a couple of days ago, and as I write this there are already <s>six</s> twelve client and <s>seven</s> fourteen server implementations signed up to be there and try to <a href="http://www.intertwingly.net/wiki/pie/InteropGrid">fill in the grid</a>.  Let’s drop some names, in alphabetical order:  AOL,  Flock, Google,  IBM,  Lotus,  Microsoft, Oracle, O’Reilly,  Six Apart, Sun, WordPress. Um, have I mentioned that the APP is going to be huge?</p>
   </div>
  </content>
 </entry>
</feed>

Atom Content

Atom Content Examples

<content type="xhtml">
  <div xmlns="http://www.w3.org/1999/xhtml">
    One <strong>bold</strong> foot forward
  </div>
</content>
<content>The "atom:content" element either contains or links to the content of the entry. The content of atom:content is Language-Sensitive.</content>
<content type="html">The &lt;code>atom:content&lt;/code> element either contains or links to the content of the entry. The content of &lt;code>atom:content&lt;/code> is &lt;a href="http://www.ietf.org/rfc/rfc3066.txt">Language-Sensitive&lt;/a>.</content>
<content type="image/png">
iVBORw0KGgoA … TAAAAAElFTkSuQmCC
</content>
<content src="image.png" type="image/png"/>

Atom Categories

Switching from RSS to Atom

Outline (Atom Publishing Protocol (APP))

  1. RSS Problems [2]
  2. Atom Format [7]
  3. Atom Publishing Protocol (APP) [8]
  4. APP for AJAXLink [2]
  5. Conclusions [1]

Syndication Format Protocols

RESTified Syndication

Collections, Members, Entries, Media

Protocol Summary

Resource HTTP Method Representation Description
Introspection GET Introspection Document Enumerates a set of collections and lists their URIs and other information about the collections
Collection GET Atom Feed A list of member of the collection (this may be a subset of all entries in the collection)
Collection POST Atom Entry Create a new entry in the collection
Member GET Atom Entry Get the Atom Entry
Member PUT Atom Entry Update the Atom Entry
Member DELETE n/a Delete the Atom Entry from the collection

Service Documents

Service Documents represent server-defined groups of Collections, and are used to initialize the process of creating and editing resources.

Service Document Example

<service xmlns="http://purl.org/atom/app#" xmlns:atom="http://www.w3.org/2005/Atom">
 <workspace>
  <atom:title>Main Site</atom:title>
  <collection href="http://example.org/reilly/main">
   <atom:title>My Blog Entries</atom:title>
   <categories href="http://example.com/cats/forMain.cats"/>
  </collection>
  <collection href="http://example.org/reilly/pic">
   <atom:title>Pictures</atom:title>
   <accept>image/*</accept>
  </collection>
 </workspace>
 <workspace>
  <atom:title>Side Bar Blog</atom:title>
  <collection href="http://example.org/reilly/list">
   <atom:title>Remaindered Links</atom:title>
   <accept>entry</accept>
   <categories fixed="yes">
    <atom:category scheme="http://example.org/extra-cats/" term="joke"/>
    <atom:category scheme="http://example.org/extra-cats/" term="serious"/>
   </categories>
  </collection>
 </workspace>
</service>

Category Documents

Category Document Example

<app:categories xmlns:app="http://purl.org/atom/app#" xmlns="http://www.w3.org/2005/Atom" fixed="yes" scheme="http://example.com/cats/big3">
 <category term="animal"/>
 <category term="vegetable"/>
 <category term="mineral"/>
</app:categories>

Outline (APP for AJAXLink)

  1. RSS Problems [2]
  2. Atom Format [7]
  3. Atom Publishing Protocol (APP) [8]
  4. APP for AJAXLink [2]
  5. Conclusions [1]

Linkbases as Feeds

Item Categories

Outline (Conclusions)

  1. RSS Problems [2]
  2. Atom Format [7]
  3. Atom Publishing Protocol (APP) [8]
  4. APP for AJAXLink [2]
  5. Conclusions [1]

AJAXLink goes APP