Programming RSS in Windows Vista
The increasing popularity of blogs helped also to popularize the concept of “subscribing” to web content. Syndication mechanisms such as RSS or Atom have been the driving factor for a sheer flood of server side information dissemination applications – such as weblogs and their client side counter parts, such as blog readers.
Recently these applications have outgrown the original concept of transporting blog or news headlines or stories. RSS is used more and more to carry audio files, pictures and any imaginable kind of content. Usage as a notification mechanism has evolved as well. From simple news tickers to stock or weather information to creative new approaches such as notifications for peer-to-peer file sharing applications.
RSS – as used in here – does not stand for a particular version of RSS. In fact, the same principles apply to all versions of RSS and the more recent Atom format. RSS will be used here as a placeholder for syndication formats.
Side note for the curious: The somewhat confusing history of the original RSS format (most often called “Really Simple Syndication”) can be found here: blogs.law.harvard.edu/tech/rssVersionHistory (told by Dave Winer, one of the key figures in the development of today’s syndication formats).
Fortunately you do not need to take care of those tricky details – the Windows RSS platform shields you from format details and even supports upcoming formats such as Atom.
RSS Platform Support in Windows Vista
Whether you need to implement “traditional” or innovative RSS scenarios, you will basically deal with:
- Common RSS Feed List. Provides a read-only copy of the user's feed list in Outline Processor Markup Language (OPML) format, which is stored in the user's Documents folder. The users can use this OPML file to save, e-mail, or import a copy of their feed list into another application.
- Common RSS Data Store. Aggregates feed content into the Common RSS Data store, which allows concurrent access by multiple applications. The store is designed to allow efficient updating and access of feeds and individual items. Enclosure files are written into folders that a user can navigate to from within the Windows Explorer application. The RSS Common Data Store provides a number of services, including automatic purging of feed data and enclosures.
- RSS Platform Sync Engine. Automatically downloads feed content and files (enclosures) from RSS feeds. The RSS sync engine handles on-demand and background updates, and the merging of new feed content with existing content. Each feed is synchronized in the background on a user-defined schedule so that the user has fresh information available without having to manually check for new content. Each feed publisher can specify a default update schedule, which the service will respect unless the user indicates otherwise.
These services are accessible through the Windows Vista RSS object model, which mirrors the major components of an RSS feed.

- Feed. The Feed object contains a collection of items as well as feed and channel properties. It is also possible to access the feed XML for applications that perform operations on the XML instead of using the feed's properties.
- FeedItem. The Item object contains an enclosure as well as item properties. It is also possible to access the item XML for applications that want to perform operations on the XML instead of using the item's properties. Most properties of an item cannot be changed by a client application, with the exception of the common read/unread property.
- FeedEnclosure. The Enclosure object contains enclosure (or attached file) properties. One of the properties is the local path, which makes it possible for applications to get access to the enclosure through the file system.

The RSS Common Data Store provides a number of services including automatic purging of feed data and enclosures.
The RSS sync engine handles on-demand as well as background updates and the merging of new feed content with existing content. Each time a feed is synchronized the feed:
- Is downloaded from the server via HTTP or HTTPS.
- Is parsed and normalized into a unified format.
- Identifies new and updated items.
- Merges into the store new and updated items.
- Is updated to reflect the last synchronization time.
New items
New and updated items are identified by comparing each item in a feed with the items for that feed in the store. When an item is new it is then added to the store. When an item has been updated the new version of the item overwrites the one in the store.
New items are always marked as "unread." Updated items similarly get marked as "unread," even if they were "read" before.
Merging for feeds and lists
For feed (time-ordered) content, the content of the downloaded feed is merged with the local content in the following way:
- New items are appended to the local content.
- Updated items overwrite the corresponding items in the store.
The merge semantics for lists is somewhat different from the semantics for feeds.
For lists, the downloaded feed is merged in the same way, except that all items in the store that are not in the most recent feed from the server are deleted in the store. Lists also maintain an inherent sorting that is reapplied each time the feed is downloaded. This ensures that the content is resorted even if that is the only change.
Enclosures (files)
Enclosures will be automatically downloaded for feeds that have enclosure download turned on. (By default, all feeds have enclosure download turned off.)
Enclosures of new and updated items will be downloaded in the background during idle network time (except when a user explicitly requests an enclosure download).
Enclosure download is integrated with the Attachment Execute Services (AES), a Windows service that maintains an allow/block list for certain file types. As a result, executable files are blocked by default from being downloaded by the Windows Vista platform. Antivirus and antispyware applications can also block enclosures from being downloaded.
Scheduling
Each feed is synchronized in the background on a user-defined schedule so that the user has fresh information available without having to manually check for new content.
Each feed publisher can specify a default update schedule, which the service will respect unless the user indicates otherwise.
Adding Feeds from IE
While browsing the Web, users will be able to easily discover RSS feeds through an illuminated icon, as well as read the feed while still in the Web browser. Additionally, users will be able to subscribe to an RSS feed as easily as they now add a Web page as a favorite. Once a user chooses to subscribe to a feed, the fact that the user has subscribed is available to any interested application.

No need to hunt down those little “XML” or “RSS” buttons on web pages: Watch the feed icon – it will auto discover RSS feeds

Click to display a list of discovered feeds:

If the feed contains not just headlines, but full stories, the integrated RSS reader may be the best place to catch up with the news,

Sorting and filtering feeds is an integral feature as well.
|