23

I am developing (yet another) password manager add-on for Firefox. My add-on needs to:

  • Add two context menu items to each password field.
  • Open a dialog box or floating panel when the menu item is selected.
  • Access a specific method of a specific XPCOM component.
  • Fill the password field.
  • Include a preferences window.
  • Be compatible with Firefox 4.0.

Preferably, also:

  • Run on Firefox 3.5 and 3.6.
    • Some users don't update to the latest version.
    • Firefox 4.0 won't run on a PowerPC Mac.
  • Install without a restart on Firefox 4.0.
  • Allow for localization.

I have tried the Add-on SDK (formerly known as Jetpack), and it makes it very easy to start developing. However, I find that HTML cannot easily create "native looking" dialog boxes and that the SDK is rather heavyweight. (It takes many kilobytes to build a simple extension; that includes an XPCOM component!)

What are the advantages and disadvantages of using the Add-on SDK to develop my Firefox extension? Is it ready for "serious" extension development?

1 Answer 1

22

Advantages:

  1. Jetpack API exposes high level APIs for most of the things you mentioned:

    • Add two context menu items
    • floating panel
    • API for password manager
  2. Jetpack based add-ons are restart-less.

  3. Jetpack based add-ons are future proof in a sense that high level APIs will remain unchanged for the coming versions of FF.

  4. You may be able to use some community developed modules for APIs that are not exposed by SDK.

  5. If this is not the last extension you're planning to build there is a potential for code reuse, by building third party modules as ones mentioned in 4 (see docs for details)

  6. Support for mobile FF is coming in post 1.0 version of Addon-SDK which may mean that your extension can be made compatible with mobile version of FF with minimal to zero effort.

  7. Jetpack comes with build-in unit testing framework.

  8. Has a better security model, which will ease add-on review process.

  9. Jetpack support commonjs modules / packages that which means that some of the code can be borrowed from other projects like nodejs for example.

Disadvantages:

  1. Jetpack no longer supports FF<4.
  2. Does not yet have support for localization.
  3. Has no API for building preference panels, but can be developed as third party module and shared with rest of the community.
  4. Add-on will contain code with layers of abstractions, that will increase size of add-on (there is ongoing work that will reduce xpi size by excluding files that are not used by add-on).
3
  • +1 gozala. This answer is already almost 2yrs old, so there might be more advantages/disadvantages now.
    – fedmich
    Apr 5, 2013 at 10:08
  • The Jetpack libraries are now included in Firefox itself as of version 21, so that will likely result in smaller add-on sizes in the future as support moves to using the built-in libraries.
    – JAB
    Jun 19, 2013 at 16:35
  • I think support for localization has been added. That's what the "dictionaries" thing is about, right?
    – Lori
    Aug 29, 2013 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.