A few weeks ago, as part of Mozilla Labs‘ Design Challenge, I taught a tutorial on extension development. My goal was to impart the minimum necessary information to build a simple extension using modern best practices. I called it Extension Bootcamp: Zero to “Hello world!” in 45 Minutes.
The tutorial, which borrowed from other ones (including my ancient Tinderstatus tutorial, the venerable Building an Extension, and the new Firefox addons developer guide), covered:
- what extensions are, what they can do, and what they’re made of;
- how to configure your development environment on Windows, Mac OS X, or Linux;
- how to construct an extension, including required files and directory structure;
- how to package and test your extension;
It explicitly excluded:
- archiving chrome files into a JAR archive (valuable for large, popular, and stable extensions, but not worth the added complexity for the rest);
- putting CSS/image files into a separate skin package (Firefox doesn’t ship with two themes, which was the original impetus for segregating these files thusly, and most extensions don’t support third-party themes, so this is unnecessary).
To conserve time, I didn’t cover:
- accessing XPCOM components;
- using tools and documentation to introspect and learn Mozilla code and APIs.
Developing a Firefox extension is pretty complicated, since there are so many different pieces to it, and the tutorial ended up taking two hours, including time for the students to practice each lesson on their own computers (for which my colleague Jono‘s assistance in fielding questions was invaluable).
The video of the tutorial, edited down to 1.5 hours, as well as the slides and accompanying files are available. If I had time to work more on this, I’d expand it to include the essential topics I didn’t cover. I’d also update the Building an Extension tutorial to adopt the pedagogy of this one. If you’d like to do either of those things, please do!
8 thoughts on “The Extension Bootcamp Tutorial”
No love for OGG?!
Justin: I wasn’t involved on the encoding side of things, but it’s a good point; I’ll ask Pascal if he can encode them in Ogg.
Can I put a copy of the video and accompanying files up on devmo with appropriate links?
Sheppy: I’m pretty sure you can, but I’ll ping Pascal, who is running the design challenge, for confirmation.
Sheppy: Pascal says “Absolutely. The whole content is under CC-BY license. :)”.
I’ll hold off on doing the adding to MDC until I hear on the OGG version; would prefer to use that if it comes to pass.
Oops, I see there’s an ogg version already. I’m on it. 🙂
This is going to be located at https://developer.mozilla.org/En/Extensions/Bootcamp_tutorial — the video is uploading now, then I can finish the page up.
Comments are closed.