Harnessing the Mozilla Platform

Brian King

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

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

Introduction


Development Platform


Toolkit - Benefits


XUL Features


XBL - Extensible Bindings Language


XBL attach model

Accompanying Technologies


XPCOM




JavaXPCOM - Java applications can access XPCOM objects, and XPCOM can access any Java class that implements an XPCOM interface.

i18n and l10n


Web Services and More...


Mozilla Architecture Diagram


(Click for larger version)


Mozilla Platform Diagram

Cairo Graphics


  • SVG and Canvas, using Cairo libraries
  • Now default toolkit on Linux and Windows

    --enable-default-toolkit=cairo-gtk2
    
  • XULRunner - What Is?


    Getting the GRE Runtime


    1. Download a nightly (trunk) build
    2. Download 1.8.0.1

      http://developer.mozilla.org/en/docs/XULRunner_1.8.0.1_Release_Notes
      

    Build From Source


    Application Structure


    marup
         |
         ---------- application.ini
         |
         ---------- chrome.manifest
         |
         ---------- chrome
         |
         ---------- components
         |
         ---------- defaults
               |
               ---------- preferences

    application.ini


    The application will not install without this file which containes meta information.
    [App]
    Vendor=My Company
    Name=mycoolapp
    Version=1.0
    BuildID=20060425
    Copyright=Copyright (c) 2005 My Company
    
    [Gecko]
    MinVersion=1.8
    MaxVersion=1.9a1
    

    Entry Point


    Registering the GRE



    xulrunner -register-global
    


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

    Modules


    What is shipped with XULRunner? : ...

    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.

    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>\

    Extension Manager


    • One click install
    • RDF install file (install.rdf)
    • Built-in UI
    • Features - Uninstall, Disable, Options, ..
    • Version control and built-in Update system

    The Mozilla Platform


    • Each application has it's own user profile generated
    • Runs in it's own process space
    • Ensures peaceful co-existence of multiple Mozilla applications

    Future Directions


    Roadmap:
    • 1.8.1 concurrent with the release of Firefox 2 (early Q3 2006)
    • XULRunner 1.9 : first production release, shipped by Firefox 3 (Q1 2007)
    Worthy Goals:
    • Stable APIs
    • Installer
    • Development Tools
    • Versioning system

    XULRunner Demo





    Demo of a XULRunner Application


    (Marela Uploader)

    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

    The Mozilla Desktop


    Mozilla Desktop

    Who Is Using It?