Doug Bryant

Tech thoughts and notes

OSCON 2005 - Firefox Extension Development

Tools – XPIStubs (pronounced Zippy Stubs) Use this and forget half of what you need to know. Still needs some work.

Speaker looks like Hani (bileblog)

Looks like this tool stubs out everything you need to develop firefox extensions. Run the program to stub out program, do a ./configure make and it installs a plugin into firefox that pops up a window “Test”.

All you need to know to get started developing firefox extendsions are

  • XPIStubs to get quickly stubbed out
  • XUL and javascript for UI
  • XulPlanet.com for reference

Extensions allow you to add new features to existing applications and add new functionality to browsers.

Why user firefox:

  • Cross platform applications
  • add content to the users browser
  • provide the user w/ a better experience through client side customization
  • easier than many alternatives
  • b/c it’s cool

XUL
The xml interface language for mozilla/firefox

It provides

  • layout and base widget set
  • uses css for styling
  • event handling via javascript command sets
  • overlays

And… it may be loaded remotely or locally.

Command Event

  • trap events like button clicks and key presses and allow you to respond to those events.

Broadcasters

  • like command but can push out

Controllers

  • Command sets can call on controllers to respond to events (like focus)
  • Controllers are javascript classes that update state for commands

RDF and Templates

  • allows you to define a template for displaying RDF data
  • Difficult to use but very cool

XBL Bindings

  • XML binding language
  • allows ou to create new widgets or modify existing widgets

XPCOM

  • cross platform components
  • in C++, XBL or javascript. Also support scripting languages (PyXPCOM)
  • Components are global to all chrome packages
  • possibly the most important part of GRE

XPI: Cross platform Installer

  • packaged in a jar file
  • handles cross platform installs

Dev Tools

  • typically use text based tools (vim, emacs, notepad??)
  • Dom Inspector
  • cview (XPCOM inspector)
  • Venkman (javascript debugger)

Not Bad – rest seems like it will be demos, so shutting down to save batter power.

Update – ACK! It almost looks like jelly – programming in XMLWAY WAY Verbose