|
Comments
|
Today's Top SOA Links
ASP.NET Using an RSS Feed as a Content Service in ASP.NET
Bind Web pages to XML just as to databases
By: Joe Stagner
Oct. 5, 2005 11:00 AM
RSS is the technology driving the blogging craze that's sweeping the Internet, but it's far more than a blogging technology. It's a prime foundation on which to build "service-oriented" applications.
MCF was not XML based, but around 1997 Guha joined Netscape, teamed up with Tim Bray, and began building on the ideas of MCF by developing an XML-based Resource Definition Framework (RDF). At the same time, Microsoft released the "Channel Definition Format" (CDF) and introduced support for CDF into Internet Explorer 4.0 and the Windows Desktop. The popularity of ActiveX channels grew rapidly and a thirst for content syndication was born as CDF channels started popping up all over the Web, but CDF was only the beginning for generalized content syndication. CDF was not without drawbacks. There existed the opinion that CDF was "over-engineered" for the average user and built primarily for the large content provider. To make a long and convoluted story shorter, Dan Libby at Netscape built the "Site Preview Format," now commonly referred to as Open-SPF, which was immediately picked up and used by Dave Winer at Scripting News (Scripting.com). Then things really started to pick up. On March 1, 1999, Dan Libby released the first formal specification as RDF-SPF version 0.9 that was later renamed RSS v0.9. RSS 0.9 was a compromise. While it was RDF based, it was not fully RDF compliant. It was also not truly optimized for simplicity either. This directional ambivalence ultimately resulted in a three-way split in the "Syndication" community. The infighting within the RSS specification collective ultimately resulted in the formation of a loosely organized working group, started by Sam Ruby, a programmer at IBM. Using a Wiki-based process, the group defined Pie, which was renamed Echo, which was then renamed Necho, and finally named ATOM. The remaining RSS contingents also splintered and RSS 2.0 was born. RSS 2.0 was fully divergent from RSS 1.0. The two major versions are actually very different. RSS 1.0 is heavily RDF based, and so RSS version 1 offers a fully namespace-driven definition model for almost unlimited flexibility and extensibility at the expense of a significant step up in complexity for the developer or feed implementer. RSS 2.0, however, forgoes this complexity in favor of a straightforward, easy-to-create and process schema. While not necessarily "better" than RSS 1.0 or ATOM, RSS 2 seems to be enjoying the widest use and remainder of this article will be based on RSS 2.0. Since RSS 2.0 is not RDF based, the original acronym is no longer valid. When RSS 2.0 was first released it apparently didn't stand for anything in particular, though through common usage it has come to be accepted as an acronym for "Really Simple Syndication." The basic idea behind RSS 2.0 is to provide a standard XML schema for XML files to be published that describes Web site content so that other applications, including other Web sites, can read that "RSS feed" and use the feed's content to build "previews" of the original content. In this way blog entries, Web articles, press releases, or any Web-published content can be "previewed" by the item's title, a few lines of the content, and other data such as the date and time of posting. Also of significant importance in RSS 2.0 is support for "enclosures" that are used to reference audio and video media files that are described by the RSS Item content. This makes RSS a solution that solves many different problems. On the MSDN Events team at Microsoft, we spend most of our time working with development customers and one of our primarily vehicles for this interaction is our MSDNEvents.com events series. Many of us around the country send regular updates out in e-mail to user group leaders, MVPs, partners, and developer friends to let them know about our upcoming events in the hopes that they will, in turn, let others know about our events. This model of communication is less than optimal for several reasons:
First, RSS is created for consumption and can either exist as a statically generated XML file that is updated whenever the syndicated content changes or it can be dynamically generated programmatically. Most blogging software and content management or publishing systems have the capability to automatically create and update RSS files. RSS is then "pulled" by any software that is configured to poll an RSS file. This eliminates all of the aforementioned "business" problems that concern e-mail. (Remember that the RSS "file" may be a static .xml file or it may be an XML stream generated at the time of a request for the feed.) When solving my event notification problem, the really BIG gain is that I can use some simple ASP.NET code (that I could even encapsulate in a custom server control) that is parametrically configured to pull the events from a centrally provided, and always current, RSS feed. Once my friends and partners include just a bit of ASP.NET code (or custom server control) on their Web site, the site will always show the latest upcoming MSDN Events and the Web site owner never has to edit the site's content for those events to stay current. For example, The New York .NET Developers User Group can reuse my code on their Web site to show users the upcoming MSDN Events in New York state. The RSS file is updated to keep the list current. Listing 1 shows a simple example of an RSS feed. Note that the channel is described and then a number of items are listed. Reader Feedback: Page 1 of 1
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
|
SYS-CON Featured Whitepapers
Most Read This Week |
|||||||||||||||||||||||||||