10th June 2009

Posted in

Blog :: Ubiquity and Jetpack

Lately I've been getting enthused about a couple of Firefox plugins. They're both raw but I think they both point to the way forward for the programmable web.

Ubiquity is basically a command line for the web - a way to apply "verbs" to user input and web pages. Sample usage (and built in commands) include a "map" command to quickly build a googlemap and insert it into, say, the html in your webmail interface. What's cooler is that it provides infrastructure to quickly build additions to the browser that before would have to be packaged as bookmarklets or Firefox extensions. In the case of extensions it's frequently not worth the trouble and bookmarklets provide a lousy UI and development experience.

Ubiquity comes with a built in editor and commands can be tried out live in the editor or installed without any restarting required. To be honest the ease of writing commands made me think of emacs - executing code in the same tool you're writing it without any sort of compile->execute cycle. I even quickly whipped up an unwrap command when I was repetitively pasting sql statements from mysqlbinlog in a console to phpMyAdmin to restore some damaged data. Newlines inserted by the console were messing up the sql statements and visually scanning each statement was error prone. 30 seconds after thinking about it I had a two line Ubiquity command up in the editor that allows me to select some text in a textbox and unwrap it...

Along the same lines is the other Firefox extension Jetpack. This is even more alpha - but perhaps even cooler than Ubiquity. Similarly Jetpack comes with it's own editor that allows you to run code or install Jetpack features without a restart. While Ubiquity aims at interacting with webpages, Jetpack aims at interacting with the browser and exposes an API to let you play with notifications, the status bar, tabs and includes JQuery to easily slice and dice html and access web API's. Want to write an extension that shows your unread GMail message count in the status bar? The Jetpack tutorial does this in 45 lines of code and you can execute the code as part of the tutorial and immediately see the message count display. I can see Jetpack giving Firefox's conventional plugin infrastructure a serious challenge - I've already replaced one of my plugins with a few lines of javascript in Jetpack and I'll release it after I've added a couple of features.

Jetpack reminds me even more strongly of my Emacs environment. Emacs is famously "the programmable editor" and until you've taken advantage of that environment you don't know what an advantage that is. Firefox, with the new speed improvements to its Javascript engine, and new and easier methods of adding programmable functionality is becoming the programmable browser.

Posted on June 10th 2009, 10:58 PM

blog comments powered by Disqus