Monday, April 17, 2006

Adding RSS Feeds to Blogger: Part 2

After implementing my RSS feed in both AJAX and Feed2JS, I decided to conduct a little bake-off between the two approaches:
Did you notice any difference in user experience? If so, which one do you prefer and why?

The AJAX version is based on sample client and server code that I downloaded (see Part 1 for references). I cleaned up the code a bit and added simple caching to the PHP-based proxy. Feel free to download the code and give it a try! You'll need a server than can run PHP - it uses CURL to make HTTP requests and it needs to read, write, and delete local cache files. Unzip the files to a directory on your server, change the rss_feed variable in index.html to point to delicious_proxy.php, and you're good to go!

Feed2JS is a free, hosted service that packages RSS feeds in JavaScript, which can then be included in any Web page, using an HTML <script> tag. You can also download the PHP code and run Feed2JS on your own server. Getting a feed to show up on my site couldn't have been more simple: enter some parameters, copy and paste a little JavaScript, and presto, the feed appears! Defining styles to seamlessly blend the feed into my site was a bit more complex for me, but for someone who is more hands-on with CSS, it should be a snap!

Both approaches are very easy to implement, but with zero technical footprint required, Feed2JS has to win, in terms of simplicity.

No comments: