Jetpack/FAQ: Difference between revisions

Line 4: Line 4:
== General ==
== General ==


''' What is the Add-on Builder? '''
''' What is the Add-on Builder (beta)? '''


The Add-on Builder is an online development environment which you can use with just a web browser. It provides a code editor, a file browser, and tools to help test and package your add-on right in the browser.
The Add-on Builder is an online development environment which you can use with just a web browser. It provides a code editor, a file browser, and tools to help test and package your add-on right in the browser.
Line 16: Line 16:
Jetpack SDK is the old name for the Add-on SDK.
Jetpack SDK is the old name for the Add-on SDK.


''' What are the benefits of using the Add-on SDK? '''
''' What are the benefits of using the Add-on SDK and Add-on Builder (Beta)? '''


The Add-on SDK lets you build Firefox add-ons using common web technologies like HTML, JavaScript and CSS, and it includes tools to make it easy to create, test, and package add-ons.  
These tools lets you build Firefox add-ons using common web technologies like HTML, JavaScript and CSS, and it includes tools to make it easy to create, test, and package add-ons.  


The SDK is designed to produce add-ons that will be forwards-compatible with future versions of Firefox, so you won't need to update your add-on every time a new version of Firefox is released. SDK-based add-ons benefit from a security model that limits the harm that can be caused by a vulnerability in add-on code.
The tools are designed to produce add-ons that will be forwards-compatible with future versions of Firefox, so you won't need to update your add-on every time a new version of Firefox is released. Add-on SDK and Add-on Builder-based add-ons benefit from a security model that limits the harm that can be caused by a vulnerability in add-on code.
                                          
                                          
Finally, the SDK implements the [http://www.commonjs.org/ CommonJS] Packages and Modules specifications to enable a rich ecosystem of third-party APIs that developers can use to build their add-ons in addition to the APIs built into the SDK itself. We maintain a page listing some of the [https://wiki.mozilla.org/Labs/Jetpack/Modules extra third-party APIs] you can use in your add-on.
Finally, the Add-on SDK and Add-on Builder implement the [http://www.commonjs.org/ CommonJS] Packages and Modules specifications to enable a rich ecosystem of third-party APIs that developers can use to build their add-ons in addition to the APIs built into the Add-on SDK and Add-on Builder itself. We maintain a page listing some of the [https://wiki.mozilla.org/Labs/Jetpack/Modules extra third-party APIs] you can use in your add-on.


''' What are the benefits to users add-ons created with the Add-on SDK and Add-on Builder? '''


''' What are the benefits to users of SDK-based add-ons? '''
Add-ons created with the Add-on Builder or the Add-on SDK are restartless by default, meaning users can install and remove add-ons built with these tools instantly, without a browser restart. This makes it easier to try add-ons and personalize their browsing experience.   
 
Add-ons created with the Builder or the Add-on SDK are restartless by default, meaning users can install and remove SDK-based add-ons instantly, without a browser restart. This makes it easier to try add-ons and personalize their browsing experience.   


Developers and users alike also will not have to worry about add-on compatibility with new versions of Firefox.  
Developers and users alike also will not have to worry about add-on compatibility with new versions of Firefox.  


Finally, SDK-based add-ons will soon load in separate processes, so slow-running add-ons won't slow down Firefox itself.
Finally, add-ons built with these tools will soon load in separate processes, so slow-running add-ons won't slow down Firefox itself.


''' Can I do everything with the Add-on SDK and Add-on Builder (Beta) that I could with a XUL-based add-on? Should I rewrite my XUL-based add-on now? '''


''' Can I do everything with the Add-on SDK that I could with a XUL-based add-on? Should I rewrite my XUL-based add-on now? '''
You can do nearly everything with an Add-on SDK and Add-on Builder based add-on that you can do with a XUL-based add-on, including:


You can do substantially everything with an SDK-based add-on that you can do with a XUL-based add-on, including:
* modifying XUL windows
* modifying XUL windows
* accessing XPCOM components
* accessing XPCOM components
Line 43: Line 42:
You have to do some things differently: in particular, you can't use XUL overlays in SDK-based add-ons because they are not compatible with restartless add-ons. Instead, you have to use DOM manipulation.
You have to do some things differently: in particular, you can't use XUL overlays in SDK-based add-ons because they are not compatible with restartless add-ons. Instead, you have to use DOM manipulation.


However, in the 1.0 release the SDK is aimed primarily at Web developers who wish to write add-ons but are unfamiliar with the traditional XUL-based approach. So it supports a set of easy-to-use high level JavaScript APIs which address the most common use cases encountered by add-on developers. Using only the high level APIs, you can't do everything a XUL-based add-on can do.
Add-on Builder is aimed primarily at Web developers who wish to write add-ons but are unfamiliar with the traditional XUL-based approach. So it supports a set of easy-to-use high level JavaScript APIs which address the most common use cases encountered by add-on developers. Using only the high level APIs, you can't do everything a XUL-based add-on can do.


After shipping 1.0 one of our top priorities is to help developers migrate from XUL-based add-ons to SDK-based add-ons, so implementing advanced add-ons with the SDK will get much easier.
After shipping 1.0 one of our top priorities is to help developers migrate from XUL-based add-ons to Builder/SDK based add-ons, so implementing advanced add-ons will become much easier.


So if you're a XUL add-on developer, an early adopter, and are willing to participate in the development process, then now is a great time to try out the SDK and help us figure out the right set of features to enable you to make the transition.
So if you're a XUL add-on developer, an early adopter, and are willing to participate in the development process, then now is a great time to try out the Add-on SDK and Add-on Builder and help us figure out the right set of features to enable you to make the transition.


''' What do I need to know to write an add-on using the Add-on Builder (Beta) and Add-on SDK? '''


''' What do I need to know to write an add-on using the SDK? '''
You'll develop add-ons using JavaScript, and you'll interact with web content via the DOM. You'll use HTML and CSS to structure and style your own user interface components.


You'll develop add-ons using JavaScript, and you'll interact with web content via the DOM. You'll use HTML and CSS to structure and style your own user interface components.
''' What are the system requirements for the Add-on Builder (Beta)? '''


You need Firefox version 4 or later, and an Internet connection.


''' What are the system requirements for the SDK? '''
''' What are the system requirements for the Add-on SDK? '''


You need [http://python.org/ Python 2.5, 2.6, or 2.7], and Firefox version 4 or later.  
You need [http://python.org/ Python 2.5, 2.6, or 2.7], and Firefox version 4 or later.  
Line 61: Line 62:
If you're running Windows, [https://wiki.mozilla.org/MozillaBuild MozillaBuild], while not mandatory, will install the correct version of Python and the MSYS package, which will make it easier to work with the SDK.
If you're running Windows, [https://wiki.mozilla.org/MozillaBuild MozillaBuild], while not mandatory, will install the correct version of Python and the MSYS package, which will make it easier to work with the SDK.


''' Will the Add-on SDK and Add-on Builder (Beta) be fully integrated into Firefox? '''


''' What are the system requirements for the Builder? '''
The Add-on SDK is a separate product from Firefox, and there are no plans to integrate its functionality directly into Firefox. However, the Add-on Builder, Add-on SDK and Firefox teams work closely to ensure Firefox provides a great set of extension capabilities for SDK APIs to expose to add-on developers.


You need Firefox version 4 or later, and an Internet connection.
''' Do users need to download or install anything to use Add-on SDK and Add-on Builder based add-ons? '''
 
 
''' Will the SDK be fully integrated into Firefox? '''
 
The SDK is a separate product from Firefox, and there are no plans to integrate its functionality directly into Firefox. However, the Builder, Add-on SDK and Firefox teams work closely to ensure Firefox provides a great set of extension capabilities for SDK APIs to expose to add-on developers.
 
 
''' Do users need to download or install anything to use SDK-based add-ons? '''
 
No. Users only need to install the SDK-based add-ons themselves, which are all hosted in the same place as traditional XUL-based add-ons: [https://addons.mozilla.org addons.mozilla.org].


No. Users only need to install the SDK/Builder based add-ons themselves, which are all hosted in the same place as traditional XUL-based add-ons: [https://addons.mozilla.org addons.mozilla.org].


''' Will Mozilla stop supporting XUL-based add-ons? '''
''' Will Mozilla stop supporting XUL-based add-ons? '''
Line 81: Line 74:
Mozilla has no plans to stop supporting XUL-based add-ons, and it would be premature to start making such plans, as the vast majority of Firefox add-ons are XUL-based.   
Mozilla has no plans to stop supporting XUL-based add-ons, and it would be premature to start making such plans, as the vast majority of Firefox add-ons are XUL-based.   


If at some point in the future that ratio changes, and the vast majority of Firefox add-ons become SDK-based, then it may make sense to consider deprecating XUL-based add-ons.
If at some point in the future that ratio changes, and the vast majority of Firefox add-ons are Builder/SDK-based, then it may make sense to consider deprecating XUL-based add-ons.
 


''' What about Firefox Mobile? '''
''' What about Firefox Mobile? '''


The Jetpack team's current focus is creating the best possible experience for developers of desktop Firefox add-ons. We are well aware, however, of the importance of mobile Firefox to Mozilla and its users, and we plan to prioritize mobile Firefox add-on development in a future release of the SDK.
The Jetpack team's current focus is creating the best possible experience for developers of desktop Firefox add-ons. We are well aware, however, of the importance of mobile Firefox to Mozilla and its users, and we plan to prioritize mobile Firefox add-on development in a future release of the Add-on SDK and Add-on Builder.


''' What is Jetpack? '''
''' What is Jetpack? '''


Jetpack is a project to make it easy to build Firefox add-ons using common web technologies like HTML, JavaScript, and CSS. Our goal is to enable anyone who can build a web site to participate in making the Web a better place to work, communicate, and play.
Jetpack is a project to make it easy to build Firefox add-ons using common web technologies like HTML, JavaScript, and CSS. Our goal is to enable anyone who can build a web site to participate in making the Web a better place to work, communicate, and play.


''' I have a Google Chrome plugin/Safari add-on. Will it work as a Firefox add-on? '''
''' I have a Google Chrome plugin/Safari add-on. Will it work as a Firefox add-on? '''
Confirmed users
34

edits