Saturday, May 26, 2012
Saturday, May 12, 2012
So if you want to cut the cord, you can.- Scott Forstall
I wrote server-side "oPod Away" a few years ago as a server-side Perl script that ran on my home server. The point was to go through my complete podcast OPML, pull down all the RSS feeds, and then show me the last updated stamp for each. So when I was on the road I could just open on the page, see what's been updated, and then tap on it to go over the iTunes Store on my phone and download. It works great - takes abou 30 seconds to run.
Since HTML5 is all the rage these days I decided to re-write the program using HTML5 and do it all client side. Sound great? I quickly ran into the problem of Cross-Origin Resource Sharing. When I used XmlHttpRequest on a page on my server to pull the podcast RSS feed it would cause an origin error. I tried to think through creative solutions to this problem like using Yahoo Pipes, but wasn't able to get something like. I ended up throwing up a very simple proxy on Google App Engine. So now the whole application is written in HTML5 and can run on the phone. It takes about 3 seconds for a refresh and I can get my podcasts where ever I go.