2006/01/05
Fun with homepage API
But tonight I wanted to do a quick hack (minimize time, maximize fun), so I added MindFood to my Google personalized homepage. There's now an "api" (actually a mix of declarative setup and javascript bindings) to develop new modules to the page.
A few minutes to write the XML module declaration file (with a pref to choose a MindFood user), to add a new method in controller and a partial view in the Rails application, et voilĂ !
Cool things in the API: it's trivial to deal with user preferences. Inclusion of a 'location' data type is a smart move (Google Maps enabled of course). The 'content proxy' is probably the most interesting part of the Javascript functions.
What is a bit ironic is that I was thinking about a MindFood Dashboard widget, but the google homepage module was more funny, as I did not know the API. But if I write eventually the Dashboard version some day, considering the similarity between google module and dashboard widget development, it's very possible that some code will be common for the two approaches.