Firebug Architecture

From FirebugWiki
Jump to: navigation, search

This page covers the architecture of Firebug (the Firefox extension), showing internal concepts and explaining how individual components interact when Firebug is running.


Internal Concepts And Components[edit]

Brief summary of internal concepts used in Firebug's framework.

TODO: create structure of internal concepts + patterns and link to individual pages that provide detailed explanation. Use Firebug Architecture Highlights (pdf) slides.

Firebug Object[edit]

The Firebug object is the only global object and represents the roof object of the entire application. The main purpose of the object is to be used as a registry. For instance all Module and Panel objects are registered, so the frameworks knows where to send events to or what panels should be created.

Used patterns:

  • Singleton


A context object represents a document and is responsible for collecting (meta) data about the current page, on which Firebug is active. The context object is also responsible for creating instances of the registered Panel objects.

Related patterns:

  • Document
  • Factory


A panel object is used to present information to the user. The displayed data is always related to the current page. A panel is accessing the current context object to render relevant data.

Related Patterns:

  • View
  • Presentation State

Read more about concepts used in the Script Panel.





(the same life cycle like a panel, but no UI)


Navigation & Selection[edit]


Event Sources (Listener)[edit]


Data Providers & Viewers[edit]

Firebug uses the viewer-provider pattern to unify the way how UI widgets (viewers) access various data sources. The pattern supports synchronous as well as asynchronous data sources and allows to use a common API to access them.

Related patterns:

  • Provider
  • Viewer
  • Presentation State

Read a detailed explanation about Data Providers & Viewers.

Unified Rendering[edit]



The purpose of this Firefox project is to run web content in a separate process from Firefox itself. This obviously has impact also on Firebug that needs IPC channels in order to access web content.

Read more about related concepts.


Firebug offers also APIs for extensions.