What are the advantages/disadvantages of using the Add-on SDK to develop my Firefox extension?

后端 未结 1 1078
悲&欢浪女
悲&欢浪女 2020-12-25 12:53

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 dialo
相关标签:
1条回答
  • 2020-12-25 13:42

    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).
    0 讨论(0)
提交回复
热议问题