Anatomy of a Firefox Extension
Firefox Extensions are written within the Mozilla frameworking using
XUL overlays, JavaScript,
CSS, and
RDF. Also,
XPCom is used to provide
support for external libraries including
SOAP and
XML-RPC and bindings for Python, Perl and Ruby. The
XPI format facilitates online installations at a click and simple removals.
See The The Joy of XUL for more information on
the technolgies mentioned above.
name.xpi (zip file)
/chrome
name.jar (zip file)
/content
about.xul
(about in extension menu)
contents.rdf
(integrates overlay info into browser)
nameOverlay.js
(logic and functionality)
nameOverlay.xul
(scripts/import, interface elements)
/skin
/classic
/name
anything.png
contents.rdf (paths to skin files)
/default
/components
name.dll
name.js
/defaults
/preferences
name.js
name.ext
install.js(0.8-)
install.rdf (0.9+)
(GUID, name, version, description, etc)
Developer Resources
- Building an Extension - Sixteen detailed chapters straight from the source.
- How to write Firefox extensions - Overview of an XPI in a classic 'Hello World' tutorial.
- Writing Firefox Extensions - Primarily a breakdown of install.rdf but incomplete.
- Firefox Extension Wizard - Easily generate a skeleton extension.
- GUIDGen - Microsoft's tool to generate a GUID for use in your install.rdf file.
- Firefox Extension Development Tutorial - A step-by-step guide providing many examples, explanations, and external references.
- Extension Packaging - An overview of building bundles which can be downloaded and installed by a user.
XUL Development
- XUL Tutorial - Tons of focused information on the XML User-interface Language.
- XUL:Template Guide - All about generating content from an RDF datasource.
- The Joy of XUL - A breakdown of XUL and its supporting technologies.
- Why I use XUL - An informal opinion on the speed and simplicity of XUL development.