Tuesday, October 7, 2008

The Firebug Framework - What’s inside?

The Firebug Framework - What’s inside?

After my little experience with Firebug extension development I’ve noticed that there is not much documentation about the Firebug internals except for the following must-read articles:

Jan Odvarko's blog, where you can find his series of tutorials about writing Firebug extensions, Christoph Dorn’s tutorial on extending Firebug and John Barton's introduction to the Firebug source.

When I first started to skim through Firebug code I was surprised with the amount of functionality that resides inside the Firebug code. There are full sets of functions designed to accomplish all those tasks that we will need to perform while we developing with Javascript: dom queries, object iterations, array cloning, etc. What I realized is that if you don't want to dive into the code, then you won't know about this features. Perhaps you will end reinventing the wheel or knocking your head against a wall because some feature seems to be complicated to implement.

My experience with symfony and the project itself is that one of the main reason why I had choose it and why other developers choose symfony is because the good set of documentation it contains. I think that the lack of documentation about the Firebug core make it hard for beginners to start with Firebug extension development.

Instead of complaining at the project google group I decided to start writing some docs around those functions. I plan to create a Classes and Functions catalog along with descriptions on how to use them. So in future posts I will start adding some docs about what I call the Firebug Framework -if I get some complains about this nickname I will call it just library :)-.

Here is my intended "Table of Contents" taken from the actual sections on the Firebug lib.js file:

  • Namespaces
  • Basics
  • Localization
  • Visibility
  • Window iteration
  • CSS classes
  • DOM queries
  • DOM Modification
  • XPath
  • Clipboard
  • Graphics
  • CSS
  • XML Serialization
  • String escaping
  • Menus
  • Stack Traces
  • Event Monitoring
  • Functions
  • Source Files
  • JavaScript Parsing
  • Events
  • DOM Events
  • URLs
  • Network
  • Programs
  • Debug Logging
  • DOM Constants

It's seems to be a lot, I will try my best So stay tuned. 

No comments: