Firefox Extension Development

| | Comments (2)
I've been playing around with Firefox extension development lately and am finding the experience a little mixed. On the plus side it seems like a powerful interface that allows for many cool extensions. On the other hand, the documentation is somewhat lacking in real world examples and the development can be tedious because of silent runtime errors.

Am I the only one having problems with my sourced JavaScripts just silently failing after a change? I find the best approach so far is to (yech) insert alert() calls intermixed with almost every second line you are writing. Once you test it and it runs properly then remove the alerts. Whichever alert you see last is usually the failing point. Tedious. JavaScript 1.0 (ECMAScript) was standardized in 1996! Is this really the height of JavaScript development?

One aspect of extension development that was not as documented as one might expect is how to do quick XUL modifications and reloads. The compile-package-view steps. I finally came across this page that describes how to disable the XUL cache (so you don't need to restart FireFox each time) and also explains that you should be working on an 'expanded' extension and not one that has been jar'ed up.

My last gripe is a lack of discussion around Software Design when writing extensions. Things like appropriate, flexible and efficient ways to interact with preferences and clean ways of separating logic and presentation. So far it seems most examples re-invent the wheel and do so without thought to code reuse.

2 Comments

Have you tried Venkman?

--Asa

I found the following very helpful:

try {...} catch(e) { alert(e); }

Leave a comment

About this Entry

This page contains a single entry by Dylan published on August 21, 2004 10:09 AM.

bugmenot was the previous entry in this blog.

satisfaction is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.