RSS/ATOM/GDATA/JSON/REST – Demystified
Posted by Anandhan Subbiah on Jul 29, 2009 in Technical Articles • No commentsInformation distribution is a key issue for any business and the buzz words in the title of this blog are associated with this key concept.
RSS
Really Simple Syndication is a popular mechanism for receiving and publishing content from websites.Syndication is when information is categorized and normalized in addition to being collected.
Here are some key aspects of RSS 2.0:
The root element is <rss> (with the version="2.0" attribute).
The <rss> element must contain a single <channel> element, which represents the source of the feed.
A <channel> contains any number of <item> elements.
A <channel> is described by three mandatory elements (<title>, <link>, and <description>) contained within <channel>.
An <item> element is described by such optional elements, such as <title>, <description>, and <link>. An item must contain at least a <title> or <description> element.
The tags in RSS 2.0 are not placed in any XML namespaces to retain backward compatibility with 0.91–0.94.
ATOM
ATOM has more capabilities that it can be viewed as an exchange protocol based on HTTP. RSS is sufficient for publishing data but ATOM should be considered for replication and data exchange. ATOM can support editing and updating. Each and every
Here are some key aspects of ATOM:
Atom-related XML namespace (http://www.w3.org/2005/Atom).
The <subtitle> element instead of <description> (in RSS) describes the feed.
The <feed> and <entry> elements must both include an <updated> element.
<link rel="alternate" type="text/html" href="www.anandhansubiah.com"/> indicates that the document is an "alternate" representation (that is, a feed) of the web page http://www.anandhansubiah.com/.
<link rel="self" href="http://www.anandhansubbiah.com/blog/Atom1.0.xml"/> indicates the location of this feed document.
The attribute type="html" in the <summary> elements indicates the use of entity-encoded HTML.
Gdata
The Google Data API can be considered to be an extension of RSS and ATOM. Query capability ,authentication , updates and optimistic concurrency is the key differentiators between these different technologies. Optimistic concurrency refers to the ability to prevent different process’s from updating the data at the same time.The authentication preferred by Google when using the GData protocol is known as Authentication for Installed Applications, a Google-specific authentication mechanism. Third-party front-end applications to a GData service should use an authentication mechanism known as Account Authentication Proxy for Web-based Applications.
REST (Representational State Transfer)
REST has nothing to do with RSS, Atom or Gdata as it has nothing to do with content publication.REST is a system design explicitly intended to reflect the structure of the web. RESTful systems, according to the first constraint, are based on the client-server model—that is, the user interface and the data store are divided.RESTful systems are also stateless so no server side sessions are allowed.The third constraint requires that responses from a server in a RESTful system must be flagged (implicitly or explicitly) as cacheable.
Resources are at the heart of the four requirements of the RESTful uniform interface: resource identification, resource manipulation via representations, self-descriptive messaging, and the use of hypermedia as the engine of application state.
REST and HTTP are often spoken of together, but it is important to note that nothing requires that REST be implemented only on systems that use HTTP.
JSON
JavaScript Object Notation (JSON) is essentially a format for specifying JavaScript objects so that they can easily be transported. You could think of it as a way of serializing JavaScript objects.JSON is slowly gaining ground on XML, although is not intended to replace it. As a notation, it is clearly less verbose than XML, requiring less markup to convey the same data structure. Less data being transmitted on the wire leads to better performance of the application.
