BarCampBrussels - Firefox extensions
September 26, 2006Here are the notes I used to give a short (and unplanned) talk at BarCampBrussels on “Firefox extensions – Mashing up the web”. Most of the audience were Firefox power-users but none had written their own extensions.
Getting started writing your own extension
Firefox extensions are written in JavaScript. The Greasemonkey extension is a great way to start as it avoids the steep learning curve of writing full blown FF extensions. Download an existing Greasemonkey script, write a few lines of JavaScript and you’ve got a working prototype. You can edit the scripts live (without restarting FF).
Things you must read
My experience of writing ViewMyCurrency
(I had no knowledge of JavaScript, XUL or extensions when I started)
- 3 days to prototype the currency conversion function (without a GUI)
- 3 weeks to produce a full-blown Firefox extension. Learning JavaScript, XUL, packing of extensions, versioning and writing build scripts. The XUL documentation wasn’t perfect but it’s getting better.
- 3 months to produce user-friendly robust version. My extension is used by a lot of non-geeks. It took a lot of effort to get the extension to the state where things just work. By this point the extension was large and complex. JSUnit tests are used to prevent regressions.
- Release your extension on https://addons.mozilla.org I got almost 2000 downloads in the 2 days I was on the “Recently Updated”
- Help users give meaningful bug reports. In the beginning I lost a lot of time emailing back and forth to collect basic data on a bug. Now there’s a “Give Feedback” option in ViewMyCurrency which collects it all in one go.
- A simple video demo is worth a thousand pictures.
Although unplanned the talk seemed to be well received. Next time I’d prepare a demo of XUL (using the real-time XUL editor) and make some graphs showing usage of ViewMyCurrency.
Anybody up for organising a BarCampLeuven?
Posted by Will Moffat