4hoursearch — faster, simpler, more powerful using YQL

4hoursearch — faster, simpler, more powerful using YQL

As you know the original 4hoursearch was built using Yahoo! BOSS, YUI and Python running on Google App Engine. Although Google App Engine is a very productive environment I was unhappy with it for a few reasons. It doesn’t feel snappy enough, presumably because of the security enforcement aspects of the system, your code has to be written in Python which is not my favorite environment, and the last is that I was showcasing a great Yahoo! API by leveraging Google infrastructure. The last point is the least valid as Yahoo! doesn’t offer a truly equivalent environment but I think it will be more compelling as a showcase built entirely on Yahoo! technology. I could have moved it over to this new implementation when YQL launched but I also wanted to wait for BOSS to offer more features so I could significantly enrich the search experience at the same time.

I’ve also recently been experimenting with AJAX over traditional web applications, especially for search, as you can get far more responsive pages by transmitting less information per search result page view. This led me to decide that the UI part of the system should be entirely in the browser using HTML, CSS, and YUI while the backend would be entirely implemented using YQL.

So, in somewhat less than 4 hours, the whole thing has now been rewritten and is live on 4hoursearch.com. The suggestions are actually coming from the same API that grabs them on the frontpage of Yahoo and that uses an Open Data Table to treat that API as a table. There is also a very small glue layer in js/yql.js that shows you how to wrap up a YQL query as a YUI DataSource. Finally, in the actual search call you’ll see that I am now pulling not only the regular search results but also delicious saves & tags, key terms and any search monkey data that appears on the result page.

The best thing about it is that it is much faster as well though I’m still getting it to look right in IE :(.