Try it now! – Note: it’s still buggy.
I’ll write about changes in original ExtJS FeedReader as soon as I can. Stay tuned! However you can still grub plain (not minified) Js from server but note this is pre-alpha quality code. ALSO: this installation uses my home PC as mongodb host.
What an online feed reader is? Definitely it’s a web application. The application that has at least two components. The components are listed here:
- User interface (executed in browser, ExtJS)
- Controller (executed on server, ASP.NET MVC)
- Data store (located somewhere, MongoDB)
- Feeds downloader (of course we can update our feed only when browser request occurs, but we can lose some entries for example in case of a long pause in usage of the reader)
- And last but not least is a syndication library (Argotic framework)
Our feedreader will have the following features:
- Feed list (adding, deleting, feeds)
- Feed items viewer
- Standalone feeds downloader
INTRODUCTION
Here i just talk general things.
1. Feeds and MongoDB
(using ExtJS, ASP.NET MVC and MongoDB)
Well, in spite of the fact that MongoDB is “schema free, document oriented database engine”, we still need to develop at least document’s structure that reflects our domain. What do we have? Feeds and feed items and, since we build the simplest feed reader we will not bother ourselves with such things like users and categories.
Document Feed may contain the following fields:
- _id (which is built-in and will be used as unique id (see one of my previous posts)
- url
- title
- description
- author
Values for fields 2-5 will be given to us by Argotic.
Document Post may contain the following fields:
- _id
- feed_id
- title
- author
- content (this field will be discussed separately)
- comment
- pubDate
- item_id
Post content discussion
What data structure is used by Mongo to store our data? BSON… And from our point of view it’s just like json which means that we can develop very interesting things. The first problem we address to this JSON structure is really marvelous variety of RSS/ATOM extensions. And this variety brings us to two issues:
- How to properly display these feeds
- How to properly extract information such as text from these feeds
At this point I should remind you that Feed data is just a xml. So we can convert it to JSON with no pain (well, in most cases). We can strip all standard data like title, id and leave just that very mutative body then convert it to json and store in content field. Then we can send it to Javascript just like any JSON!
2. Feeds and Argotic Syndication Framework
Argotic Syndication Framework is a really excellent syndication library. It’s powerful, extensible, and flexible.
And I'm very proud to be the part of the team.
How Argotic can facilitate our job? To answer the question let list some common operations first
- Load user entered address and determine the type of the content – OPML, ATOM, RSS.
- Parse this content
- If it is an OMPL load listed feeds and then again determine their type and parse
- While parsing feed’s content appropriately handle format extensions
Firstly, Argotic offer powerful GenericSyndicationFeed class. With the class we can load an address without concerning about its type. We can load it from an URI, a stream, or a string. Secondly, Argotic supports OPML. And finally it has an extensible extension support.
3. Feeds downloader
Feeds downloader is a standalone application responsible for schedule updates and update feeds. The problem comes form the fact that one feed updates each hour but another one just once a day. In this simple version we will ignore this fact and will update feeds every hour.
4. User interface
You will see it constantly and we should do it at least usable :-). Well, for this project I will use client part from the ExtJS feed-reader sample.
5. Putting things together: ASP.NET MVC
Our server code will be very thin. So MVC is a good choice since we are going to write only controller.
6. Setting-up Mongodb
It’s pretty straightforward. Just download it, unpack wherever you want, and create data directory (in Windows case it will be c:\mongo\db). To get Mongo working you need to run mongod from the bin folder.
7. Setting-up Argotic Syndication Framework
Download it – note that it will probably be better to build library from the latest sources.
8. Setting-up ASP.NET MVC
Well, again just download it and install. If you are using Visual Studio 2010 skip this step.
9. Setting-up ExtJS
Download it and unpack. Later we will prepare feed-reader sample
And finally we will get something like this
Yes it looks totally like extjs sample but it has a lot of differences under hood.

and slightly modified version (I’m working hardly on it now)
