Harnessing the Mozilla Platform

Brian King

Independent Consultant / mozdev.org / Mozdev Group, Inc.

(Best viewed in fullscreen mode (F11) with maximum horizontal space)


Development Platform

XPFE Layer Model

XPFE Layers

XUL - Benefits

XUL Features


XBL Example

XBL Model


Accompanying Technologies



Web Services and More...

Mozilla Architecture Diagram

(Click for larger version)

Mozilla Platform Diagram

Software Installation


XULRunner 1 (1.9)

XULRunner 2

Getting the GRE Runtime

2 Options:
  1. Download and build from source
  2. Download a nightly (trunk) build

XULRunner 3

Application Structure

XULRunner App Directory Structure

XULRunner 4

Entry Point

XULRunner 5


The application will not install without this file which containes meta information.
Vendor=My Company
Copyright=Copyright (c) 2005 My Company


XULRunner 6

Registering the GRE

xulrunner -register-global

This updates the registry on Windows (HKLM\Software\mozilla.org\GRE), and writes to /etc/gre.d on Linux.

XULRunner 7

Deployment 1 - Launching from Flat Structure

xulrunner /path/to/my/application/application.ini

This will launch the application directly from where it is unpacked on the system.

XULRunner 8

Deployment 2 : -install-app

Linux : ./xulrunner -install-app /path/to/my/application.xpi
    Installed to /usr/lib/<vendor>/<appname>/
Mac : /Library/Frameworks/XUL.framework/xulrunner-bin -install-app /path/to/my/application.xpi Installed to /Applications/<vendor>/<Appname>
Windows : xulrunner.exe -install-app /path/to/my/application.xpi Installed to c:\Program Files\<vendor>\<appname>\

XULRunner Demo

Demo of Deploying and Running a XULRunner Application (Open Kiosk)

Problems with the Platform

  • *Perceived* high barrier of entry
  • Large and daunting code base
  • Dispersed documentation (now improving)
  • Lack of IDE
  • Sketchy support in some areas (e.g. SOAP)
  • Browser/Mail bugs take priority over 'Platform' bugs

Advantages of the Platform

  • Quick prototyping
  • Separation of content, style and functionality
  • Standards Support
  • Access to 2,000+ XPCOM interfaces
  • Growing Tool Set (Bugzilla, LXR, DOM Inspector, JavaScript Debugger, Dev Tools on mozdev.org such as fastcomponent and xpistubs, ...)
  • Flexible licensing (MPL/LGPL/GPL tri-license)
  • Active (and helpful) developer community


  • MDG:
    • Customised Distros (Linspire)
    • Semantic Web / Deal Workflow (Angelsoft)
    • Toolbars (Netscape 7.1+, EarthLink)
    • Kiosk Browsers (Brooklyn Museum)
    • Handwriting Recognition Interface - HRI (Codehost)
    • Themes
  • Elsewhere: