Getting a good start in any new technology or programming
language often depends on finding the best available information. The
TechRepublic QuickStart Tools give you the information you need to
quickly grasp the fundamentals of developing in a new IDE, using a new
programming language, or working with a new development tool.
Really Simple Syndication (RSS) is a
Web content syndication format that is designed to organize, manage, and share
data available on the Internet. Each RSS text file contains dynamic information
about the Web content and static information about the site using it.
Therefore, Web sites, developers, and organizations that manage content in a
dynamic way use this format.
Besides explaining the basics, the TechRepublic QuickStart
Tools show common tasks, expose strengths and weaknesses, demonstrate some of the
best uses of RSS versions 0.9 and 2.0, and list a variety of other online and
offline resources that can help you build a solid foundation of practical
knowledge.
Language
Fundamentals
Really Simple Syndication (RSS) was originally developed by
Netscape as a format for building news portals. It was based on the Extensible Markup Language (XML) and the Resource Description Framework (RDF). RDF is
a structured model mainly used for detailing metadata on the Web.
RSS is a dialect of XML, and therefore, all RSS files must
adhere to the XML 1.0 specifications laid down by the World Wide Web
Consortium. The file is a structured list encoded so that it can be aggregated
by another program. RSS feeds are used to integrate and distribute dynamic
information.
A Sample News feed
Using RSS, we will create a sample news feed.
RSS is not a programming language but an XML-based markup
language. It is used to mark up news feeds. The markups in our example show you
how to mark up a news item called the “British Broadcasting Corporation News”
in RSS versions 0.9 and 2.0.
<rss>
<channel>
<title> British Broadcasting Corporation News </title>
<link>http://something.com/</link>
<description>British Broadcasting Corporation News Example </description>
</channel>
<item>
<title> British Broadcasting Corporation News </title>
<link>http://something.com/bbc.html</link>
</item>
</rss>
An analysis of the code shows that:
- The
code is enclosed within <rss> tags. - The
<channel> tag specifies information about the news channel. - The
<link> tag specifies the URL of a Web site, which contains all the
news. - The
<item> tag specifies which news items are to be retrieved.
<rssxmlns:dc=”http://purl.org/dc/elements/1.1/” >
<channel>
<title> British Broadcasting Corporation News </title>
<link>http://something.com/</link>
<description>British Broadcasting Corporation News Example </description>
</channel>
<item>
<title> British Broadcasting Corporation News </title>
<link>http://something.com/bbc.html</link>
<category>Enterprise Software</category>
<pubDate>Tue, 18 May 2004 19:15:00 PDT</pubDate>
</item>
</rss>
The major difference in Version 2.0 is the availability of
optional tags to specify author, category, and publication date. It provides a
namespace called dc to specify these parameters, which is declared as xmlns:dc=http://purl.org/dc/elements/1.1/ in the RSS tag.
Common Tasks
Task |
Steps |
Add an image to the channel |
To add an image for the RSS news channel, use the <image><title> British Broadcasting Corporation News Note: The image should be size 88×31. |
Specify an author (Version 2.0) |
Use the dc:creater <item> |
Add a date (Version 2.0) |
Use the dc:date <item> |
Add a short description |
Though the link tag for the news item can be used to <item> |
Create a Java reader |
Here is a snippet of a Java program that extracts news NodeList items = doc.getElementsByTagName(item); |
Strengths
Strength |
Description |
Simple and easy to understand |
RSS uses common XML. It does not contain complex syntax, |
Multipurpose |
RSS technology can be used for various applications and |
Publishing Tool |
The RSS publisher tool can be used to publish dynamic |
Extensible |
Users can extend RSS capabilities with XML namespaces to |
Metadata syndication and aggregation |
RSS can act like a mini database containing headlines and |
Easily parsed |
RSS document can be easily parsed using free or |
Weaknesses
Weakness |
Description |
Lack of GUI interface |
RSS documents are created without the benefit of a GUI |
Inability to develop high-end applications |
You cannot develop high-end applications using RSS as you |
Version incompatibility |
Some documents created using one version of RSS cannot be |
Need for RSS Validator |
RSS is a markup language, and therefore, does not have a |
Requires an external reader |
An RSS reader program is required to browse, access, and |
Best Uses
Creating and maintaining Web portals
RSS is popular technology for the development of Web sites
that require content aggregation and syndication. RSS acts like a mini database
to consolidate data into a well-organized form within a single source file.
As a source of dynamic content
RSS is an excellent medium for news exchange across the
Internet. Because RSS facilitates searching, reading, and scanning frequently
updated headlines from various sources, users can get regular updates and
information regarding latest happenings around the world when they log on to
their subscribed sites.
Aggregating links to related content
RSS is often used to aggregate and organize related links
together on one Web site.
Online resources
What is RSS?
An article that defines RSS and its uses.
RSS 2.0 Specification
An outline of the RSS 2.0 specification
from the Harvard Law School.
Meet diverse needs by using RSS to aggregate content
Web developers are often asked to create sites that cover
every possible audience need and interest. This is the reason for the
popularity of content aggregator functionality, such as RSS, and why it should
be part of your repertoire.
Introduction to RSS
A basic tutorial introducing the principles associated with
RSS.
RSS Tutorial
A tutorial that explains the features and benefits RSS,
complete with a brief technical overview of the technology involved.
RSS Module Guidelines
This guide explains namespace-based modularization and its
ability to create opportunities for compartmentalized extensibility.
Other resources
Content
Syndication with RSS, By Ben Hammersley (Author),
2003, ISBN: 0-596-00383-8
Essential Blogging, By Cory Doctorow
(Author), RaelDornfest
(Author), J. Scott Johnson (Author), Shelley Powers (Author), Benjamin Trott (Author), Mena G. Trott (Author), 2002, ISBN:
0-596-00388-9
Perl Cookbook, 2nd Edition, By Tom Christiansen (Author),
Nathan Torkington (Author), 2003, ISBN: 0-596-00313-7
Perl
Template Toolkit, By Darren Chamberlain (Author), David Cross (Author),
Andy Wardley (Author), 2003, ISBN: 0-596-00476-1
Addition information
Meet diverse needs by using RSS to aggregate content
Deliver RSS content to syndication sites with JSP and
JavaScript
Parsing the News.com RSS feed with PHP
Randomize your RSS feeds with ColdFusion