viperfx07 is here to blog about hacking, cracking, website, application, android, and many more.

Tuesday, October 19, 2010

RSS 2.0 vs Atom 1.0

11:05 PM Posted by viperfx07 No comments
This week's lecture is about jQuery and RSS. Since I've done a lot of jQuery in my project, let's talk about RSS. I've already used RSS since my bachelor (so around 4-5 years). I use RSS to get Manga update, read news, and get Android update (because I've got a new toy called Samsung Galaxy S). The RSS client I use is Opera (browser). I personally like Opera more than any RSS client such as Mozilla Firefox (browser) or Thunderbird. As a browser, Opera has mail client as well.

There is an alternative RSS standard called Atom. The following is a good comparison quoted from http://blog.webreakstuff.com/2005/07/rss-vs-atom-you-know-for-dummies/. According to the comparison, Atom wins most of the battles.


1. While RSS has two main publishing protocols, Atom has one standardized approach. This waives off some of the interoperability issues between using both the Blogger protocol and MetaWeblog (the two protocols for RSS publishing). Best approach: Atom

2. When it comes to required content on a feed, Atom is much more restrictive, needing more data in order to be valid. RSS has a more loose approach. This has generated some discussion: ultimately, I like how Atom requires “last update” timestamps, but I like how RSS isn’t as restrictive to be standard. Best approach: Both have their strong side

3. RSS requires escaped HTML or plain text, while Atom allows for other forms of data. This increases human-readability of an Atom feed, even though it complicates the publishing process (because you have to specify the kind of data you’re publishing). Best approach: RSS (assuming that a feed is meant for automated consumption – human readability is a task for the reader or aggregator)

4. Atom clearly distincts partial content from excerpts, while RSS doesn’t. This clearly makes a difference, because there’s no way to know when an item on an RSS feed is a full story or an excerpt (that requires loading the original page in order to continue reading). Best approach: Atom, clearly.

5.Auto-discovery is standardized in the Atom specification, whereas in RSS there have been several ways to discover feeds, to this date. Best approach: Atom even though it is not a grave situation for RSS.

6. Aggregating and extracting content is one of the most important issues, and the one that clearly gives Atom an advantage. RSS allows content only inside a single monolithic rss document including several entries. Atom on the other hand allows for single Atom Entry documents, that make syndicating, aggregating or reusing single entries of a feed a much easier process. Best approach: Atom


Examples of RSS & Atom:

RSS 2.0


<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
        <channel>
 
                <title>Example Feed</title>
                <description>Insert witty or insightful remark here</description>
                <link>http://example.org/</link>
                <lastBuildDate>Sat, 13 Dec 2003 18:30:02 GMT</lastBuildDate>
                <managingEditor>johndoe@example.com (John Doe)</managingEditor>
 
                <item>
                        <title>Atom-Powered Robots Run Amok</title>
                        <link>http://example.org/2003/12/13/atom03</link>
                        <guid isPermaLink="false">urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</guid>
                        <pubDate>Sat, 13 Dec 2003 18:30:02 GMT</pubDate>
                        <description>Some text.</description>
                </item>
 
        </channel>
</rss>

Atom 1.0


<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
        <title>Example Feed</title>
        <subtitle>Insert witty or insightful remark here</subtitle>
        <link href="http://example.org/"/>
        <updated>2003-12-13T18:30:02Z</updated>
        <author>
                <name>John Doe</name>
                <email>johndoe@example.com</email>
        </author>
        <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
 
        <entry>
                <title>Atom-Powered Robots Run Amok</title>
                <link href="http://example.org/2003/12/13/atom03"/>
                <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
                <updated>2003-12-13T18:30:02Z</updated>
                <summary>Some text.</summary>
        </entry>
 
</feed>

0 comments:

Post a Comment