Thursday, February 02, 2006

Walter, the IE Program Manager, just announced on the IEBlog that the Windows RSS Platform is going to be available on the Windows XP as well as Vista. It will be installed as a part of IE7 package. This is indeed a great news and shows Microsoft's commitment to the “RSS anywhere” paradigm and would like to remind that they should not forget the Windows CE world. I am a strong believer that RSS has a great potential that is going to grow beyond Weblogs and news feed applications.

RSS
2/2/2006 6:35:14 PM (GMT Standard Time, UTC+00:00)  #    Comments [38]  | 
 Monday, October 10, 2005

RSS team at Microsoft has posted a link to download the PDC slides from “Windows Vista: Building RSS-enabled applications.”  presentation. In the slides they show the diagram of the RSS objects model and a few code samples of its usage in the managed code. First of all the object structure is presented as a set of interfaces (IFeed, IFeedItem etc..) which is explained by the fact that RSS platform in the Vista are built on COM and the RCW in  .NET exposes COM objects as interfaces. Second of all, because of its COM nature the code in .NET becomes not particularly a .NET friendly forcing a developer to use Class when instantiating an interface instance:

IFeeds feedMgr = new FeedsClass();

foreach (IFeed feed in feedMgr.Subscriptions.Feeds)
{                         
 Console.WriteLine(feed.Name);
 
   foreach (IFeedItem item in feed.Items)
      Console.WriteLine("\t" + item.Title);
 
 Console.WriteLine ();
}

I am not sure why the RSS team has decided use COM for that (probably to make RSS platform accessible from VC++), but it's better than nothing, right?

RSS
10/10/2005 7:08:48 PM (GMT Daylight Time, UTC+01:00)  #    Comments [30]  | 
 Wednesday, August 17, 2005

The best way to test functionality and usability of a library is to use it for development for some real project. So I took the OpenNETCF.Rss library for a spin and created a RSS reader for Pocket PC. I gave it a name “OpenRSS”. During its development I discovered a few bugs and missing functionality in the OpenNETCF.Rss, so the time spend was worth it. Here are a few screenshots:

The OpenRSS is a work in progress. It doesn’t implement all functionality that would be required for a production ready RSS reader, so consider it as a sample or a starting point.

You can download the OpenRSS’s project with updated OpenNETCF.Rss bits here:

OpenRSS.zip (180.63 KB)

I’ve also uploaded the OpenNETCF.Rss into the Vault, which means it should become a part of SDF in the future release.

8/17/2005 5:06:07 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Tuesday, August 09, 2005

I've updated the OpenNETCF.Rss library I posted about last time. The IFeedStorage interface has been added. It exposes the following methods:

public interface IFeedStorage

{          

          ///

          /// Inits the storage provider.

          ///

          /// Represents a single node in the XML document

          void Init(XmlNode section);

 

          ///

          ///   Adds an element with the specified key and value into the storage.

          ///

          void Add (Feed feed);

           

          ///

          ///   Removes all elements from the storage.

          ///

          void Flush ();

           

          ///

          ///   Gets the element with the specified key.

          ///

          Feed GetFeed (string key);

           

          ///

          ///   Removes the element with the specified key.

          ///

          void Remove (string key);

           

          ///

          ///   Updates the element with the specified key.

          ///

          void Update (Feed feed);

           

          ///

          ///   Gets the number of elements actually contained in the storage.

          ///

          int Size{ get; }

}

 

I've also created the FeedFileStorage class, that inherits from IFeedStorage and implements the functionality to store RSS feeds in the file system. You can provide your own implementaion of the IFeedStorage that could store feeds in the database or in some other location. The FeedEngine class now has the Storage property:

public static IFeedStorage Storage

It will return the currently enabled feed storage which is dynamically loaded from the config file settings:

<storage>

      <provider name="fileStorage" enabled="true" type="OpenNETCF.Rss.FeedFileStorage,OpenNETCF.Rss,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null">

            <path value="C:\Temp\Channels" />

            <feedSizeLimit value="100" />

      </provider>

storage>

So in order to load your own feed storage you'd need to add a similar section to the config file and modify the enabled flag appropriately. The path and feedSizeLimit settings are specific to the file storage. You can provide your own parameters and load them in the IFeedStorage.Init method.

Here's the updated version of the library as well as test clients:

OpenNETCF.Rss1.zip (425.74 KB)
8/9/2005 8:00:06 PM (GMT Daylight Time, UTC+01:00)  #     | 
 Thursday, August 04, 2005

The “RSS”, “blogging”, “PODcasting”, “OPML” – these acronyms are becoming increasingly big in the technology world. Especially after Microsoft had announced about RSS support in the Longhorn err… Vista and IE7. The MSDN article mentions photo blogs, moblogs, and video blogs as well as calendar feeds. But wait a second. Why does it have to run on a desktop? I am pretty sure that all these usage scenarios are perfect fit Mobile devices as well. So here’s a hint for Mobile devices / developers teams at Microsoft – let’s extend the “RSS everywhere” paradigm to the Windows CE platform as well. Call me crazy, but I also think RSS feeds could become more then an XML over HTTP. RSS feeds and lists don’t have to be blogs. They could as well include any type of business information that needs to be updated on a regular basis. What prevents us to use RSS over different communication channels like UDP or TCP?

 

So having all these ideas in mind I have started on creation of Y.A.R.F (Yet Another RSS Framework). I know there’re a few .NET implementations available on the internet, but I didn’t like either of them – they’re not flexible or extensible enough. I wanted a framework that could be used on both .NetCF and full .NET, allowed usage of the configuration files and was able to process Atom feeds as well. So here it is – a technology preview of the OpenNETCF.Rss library. When designing the architecture for the framework I’ve tried to model it after a WSE which provides paradigms of “channels” or connections and “transports“ or protocols that’re used to transport the data. Here’s the class diagram of the OpenNETCF.Rss library:

When developing the OpenNETCF.Rss I’ve used some RSS and Atom parsing code from the most excellent Dare’s RSSBandit.

 

There're a few ways you can use this library to retreive a RSS feed.

 

1. Syncronously:

 

Feed feed = FeedEngine.Receive(new Uri(“http://myfeed/rss.aspx”));

 

2. Asyncronously through event handler:

 

FeedEngine.FeedReceived+=new FeedReceivedHandler(FeedEngine_FeedReceived);

FeedEngine.Subscribe(new Uri((“http://myfeed/rss.aspx”));

 

2. Asyncronously by providing an instance of your FeedReceiver:

 

public class MyFeedReceiver : FeedReceiver

{

      Form1 form;

 

      public AlexFeedReceiver(Form1 form)

      {

            this.form = form;

      }

     

//Implement the Receive

      public override void Receive(Feed feed)

      {

            form.ShowFeed(feed);

      }

}

 

...

 

FeedEngine.Subscribe(new Uri("http://www.engadget.com/rss.xml"), new MyFeedReceiver(this));

I'll elaborate on the OpenNETCF.Rss design in a later posts.

The OpenNETCF.Rss is in no way complete. I am planning on adding more functionality like FeedStorage and communications channels. Please do not hesitate to comment on the design and implementation. The VS.NET solution includes test projects for the desktop and PPC device.

OpenNETCF.Rss.zip (406.65 KB)

Documentation.chm (100.58 KB)
8/4/2005 3:36:22 PM (GMT Daylight Time, UTC+01:00)  #     |