Tuesday, April 1, 2008

Feed Aggregator

The world is going for such an era where information about a person, his resume could all be found in the Internet. Search for someone, his/her blog comes up with references and stuff he/she has done and then evaluate. My firm also have started believing in this and Manish took the initiative of aggregating feeds from various employees and showing them in the corporate website as blog entries.

The Idea is simple.
  1. Have a simple file maintained which has the username, his blog rss feed url, picture image file name and the tags he needs to filter. This file would be a wiki for my sake.
  2. Have an application take this file as an input, get the entries, access the feeds and put it in user buckets.
  3. Get all the entries, order them by the descending order of the updated date (created date) and fill in in another bucket.
  4. Create the html after going through each entry. This Html would have pagination and more/less links for each blog entry and long with the image
My initial idea was to go for Ruby. But the libraries that I found was unsuitable to accommodate the rss and atom feeds. I tried my best but at the end of the day Java was there to help.

The base html was a static page which accessed the created blog.html file by Ajax. I use dprototype for this as well as the more/less feature for each entry and pagination. Simple String Tokenizer for tokenizing the data from the file, Rome and Jdom for the feed accessing functionality, some nifty code for the htmlcreation, log4j for the logging part and user/useraccessor classes.

It looks good !!! It will be up in the corporate website pretty soon !!

No comments: