Ubuntu insights, Programming in groovy, java, et als!

Wednesday, September 21, 2011

Groovy Based RSS Reader - Intro

A desktop application with the help of which a user can keep track of his favorite blogs or the frequently visited websites.
Pre-requisite to be able to work with:
The website/blog should necessarily have an option for RSS feed subscription.
Rough Ideas/Steps involved :
1) Fetch the URL of the website/blog from the user as input.
2) Search the metatags of the page for existence of an rss feed.
3) If an rss feed for the website/blog exists, fetch the rss content from the feed URL, parse it and perform the display logic.
4) On exit, save state of UI i.e of all the blogs subscribed. On reopen, update feeds.
Genuinely started with the aim to target bloggers i.e users of blogspot/wordpress and other famous blog hosting sites. Should be in a position to extend the functionality to all websites that provide for an RSS subscription.

Monday, September 19, 2011

Serializing objects in Groovy

Never came across a more sexier way to serialize objects. Thanks to groovy goodness.

def map1 = ['1':'one']
def map2 = ['2':'two']

def file = new File("C:/serializedObjects.txt")

file.withObjectOutputStream { out ->
    out << map1
    out << map2          
file.withObjectInputStream(getClass().classLoader){ ois ->
        println it