One of the great strengths of Firefox is its extensions ecosystem. Over 12,000 enhancements for the browser are available, varying from additions of simple features to complete applications such as IRC or FTP clients.
Many users just keep Firefox as their default browser because they can't live without specific extensions that don't exist in other browsers. This hackable nature of Firefox is something that Mark Surman of the Mozilla Foundation has emphasized countless times, for example in his keynote at FOSDEM 2009 a few months ago: only the ability to extend the web makes it truly the user's web.
To address this, the Mozilla Add-ons blog posed the question "How can we make the development of extensions easier?" and published an Extension Developer Survey. The top 5 requests were more concerned about the review queue, documentation, tutorials and writing and debugging tools, but several responses suggested some improvements to the add-on platform itself:
- not requiring browser restart for installation
- better debugging tools
- better packaging
- easier way to write extensions
- code generation/IDE
Writing a Jetpack extension
To get started, users have to install the Jetpack Extension and restart Firefox. The browser then shows the about:jetpack page, which contains some Jetpacks (extensions created with the Jetpack API). Jetpack community lead Nick Nguyen writes on his blog how easy it was for him to develop a new Jetpack:
I was able to put together a Delicious Notifier Jetpack Feature in less than an hour using simple JQuery, CSS, and html. All I did was install the GMail Notifier widget and pasted it into Bespin, read the 20 lines of code that made it work, and started hacking away to get the information i wanted. Since I didnt have to restart and could inspect and debug via Firebug, development was painless.
At the moment, the API reference is woefully incomplete, but this should change as people start to experiment with Jetpack. Most of the interesting objects reside in the jetpack namespace. For example, the jetpack.notifications object can be used to display a notification message, and by using jetpack.tabs properties, the developer is able to manipulate the browser's tabs.
Even distributing a Jetpack extension is simple: just drop the code into a
<link rel="jetpack" href="js-file">
visitor to the page will see a notification bar with the option to install
the Jetpack. It's also nice to see the developers have thought about
security: the user sees the whole Jetpack extension source code before he
installs it. In the future, the Jetpack system will work with a "social
trust network" to help people make informed decisions about whether to
install a Jetpack extension or not.
At the moment Jetpack is still an early prototype (that's why it's in Mozilla Labs), and it is not meant to replace the existing extension system. It is however well-suited for simple addititions to Firefox, analogous to the changes users can make to web pages with Greasemonkey. For this purpose, Jetpack clearly looks like the right choice: it not only makes developing extensions much simpler, but it creates new possibilities, such as installing an extension without the need to restart the browser.
to post comments)