Firefox's Jetpack extensions reach mobile browsing

Mozilla has begun adding mobile device support to its newer extensions framework--but it's also changing Jetpack's direction and requiring earlier extensions to be rebuilt.

Mozilla

Not long after Mozilla brought its browser to Android, the organization has adapted its Jetpack tools for building browser add-ons for mobile use, too.

"Now you can start developing add-ons for the mobile version of Firefox," said Dave Mason, Mozilla's product manager for add-on technologies, in a mailing list message yesterday about the latest Jetpack, formally called the Add-on SDK version 1.5. "For this initial release we have the page-mod API working so that you can, among other things, create add-ons that will display mobile-friendly versions of Web sites that do not have that option."

The mobile market is very important, given the tremendous growth in browsing from mobile phones and tablets, but Mozilla is having a tough time getting a foothold. The nonprofit organization is effectively shut off from Windows Mobile and iOS, and Google just released a beta version of its Chrome for Android.

But Mozilla is working hard on its Android browser--and building a browser-based mobile OS called Boot to Gecko (B2G) that it plans to showcase next week at Mobile World Congress. All this work is central to Mozilla's hope to break the ecosystem locks in the mobile market that make it difficult for programmers and device owners to switch from one group of technologies to another.

Jetpack lets people expand Firefox's abilities through use of extensions built with Web programming technologies such as HTML, JavaScript, and CSS. Jetpack lives alongside Firefox's earlier add-ons that use the more powerful but complicated XUL technology.

Because Firefox for Chrome has scrapped XUL for faster native interface ingredients, though, traditional XUL add-ons won't work. That opens the door for Jetpack, Mason told CNET.

"With the introduction of Firefox running on different platforms (Android) without the use of XUL, the Jetpack project becomes the best solution for keeping Firefox's extensibility alive," he said. "Firefox wouldn't be Firefox without add-ons and we hope that the Jetpack project will be able to keep the extensibility no matter what platform Firefox ends up on."

About 25 to 30 percent of new add-ons are written using Jetpack, he added.

Part of the promise of Jetpack is that Firefox updates shouldn't break add-on compatibility as often as with traditional XUL add-ons, because Mozilla aims to keep the Jetpack interfaces stable across new versions of Firefox.

However, the Jetpack release notes said a change with Firefox 11 means Jetpack add-ons must be rebuilt:

In Firefox 11 (currently the Firefox beta release) we removed the nsIDOMNSElement, which is heavily used in the SDK. We've updated the SDK to handle this change, but this means that add-ons built with earlier versions of the SDK will not work with Firefox 11. So if you have add-ons built with earlier versions of the SDK, you'll need to repack them using this version of the SDK.

The interface change is deeper under Firefox's covers, though, not with the Jetpack programming tools themselves, meaning that the incompatibility isn't such a big deal, Mason told CNET. "Any developers using the SDK will need to repack their add-ons but they will not need to change any code at all, as the APIs we are exposing to them remain exactly as they were before," he said.

At the same time it's working on Jetpack, Mozilla also is easing some of the pains of traditional add-ons. It's now possible for some add-ons to be installed or updated without requiring a browser restart, and Mozilla is marking add-ons as compatible by default with future versions of Firefox since most of them don't actually break with Firefox updates.

Mozilla is making deeper changes to Jetpack, too, according to a recently posted Jetpack 2012 road map.

A problem led to the changes: Mozilla had geared Jetpack for two audiences that it now believes aren't actually likely to use it.

The first of those are programmers looking to develop sophisticated extensions, but Mozilla now believes they're more likely to make full-on Web apps. The second are those who want to use the Greasemonkey technology to modify Web pages as they load, but Jetpack is too heavy and complicated for them, Mozilla believes.

The new road map said this about the change:

With shallow-integrators having better options coming in the form of apps, and the Jetpack project never really satisfying the Greasemonkey-scripters properly, we are proposing that we now turn our focus to the "Deep-Integrators."

Deep-integrators are the backbone of Firefox's add-on community. They are the developers who have made Firefox unique among browsers. While the SDK is still useful to them in its current state, we can make it an excellent toolset for them that offers a better platform than the traditional tools have.

The spotlight of this change will be "chrome mods," the ability to change the browser's user interface. (Chrome here refers to the frame around the Web pages in a browser, not to Google's browser.)

"With a new focus on deep integrators we want to investigate what kinds of modifications we can allow SDK developers to make to the desktop UI [user interface]," Mozilla's chrome-mods wiki page states. "Chrome mods should allow the developer to easily alter Firefox chrome in a manner that is very similar to page-mods with the exception that the chrome being altered must first be properly identified before the developer can alter that element."

Updated 1:37 p.m. PT to clarify that the interface change requires programmers only to rebuild their add-ons, not to rewrite them, and to add other comments about Jetpack.

 

Join the discussion

Conversation powered by Livefyre

Show Comments Hide Comments
Latest Galleries from CNET
The best 3D-printing projects of 2014 (pictures)
15 crazy old phones from a Korean museum (pictures)
10 gloriously geeky highlights from 2014 (pictures)
2015.5 Volvo XC60: updated tech, understated design
Busted! CNET readers show us their broken devices (pictures)