First look: Safari 5's extensions
Product mentioned in this article
Safari 5 delivers many new features to Apple's Web browser, but few are more prominent than the arrival of an extensions system. With an extension system in place, developers are in position to augment the functionality provided by the browser itself.
While the framework itself is primary of interest to developers, the extensions that have already started to surface will let users add to Safari all sorts of capabilities that had previously been the domain of hacks and workarounds.
Even though extensions have barely been available for a day, several developers have jumped into the fray and either demoed or published some initial add-ons. For example, yesterday at Apple's Worldwide Developers Conference in San Francisco, Mac developer Panic showed Coda Notes, an extension that can be used to add annotations to a Website.
Although Panic has, so far, elected not to publish its extension, claiming that it's still too rough around the edges, others have been more adventurous. An enterprising user has even started a Website that collects and links to extensions as they become available—at the time of this writing, the ten or so downloads available covered functionality from making it easier to watch YouTube videos in fullscreen mode to managing tasks and projects.
You still have to jump through some hoops to enable extensions at present; first you’ll have to go to Safari’s Advanced preference pane and check off “Enable Develop menu”; then you’ll have to go to the newly-visible Develop menu in the menu bar and check off “Enable Extensions.” Once you’ve done that, you’ll have access to a new Extensions pane in Safari’s preferences.
Extensions vs. plug-ins
Safari has supported plug-ins for years, but the skill level required to create them was not trivial, since they required knowledge of a lower-level programming language like C, C++ or Objective-C. In addition, Apple never created an easy and secure method for managing or installing plug-ins, which further limited their appeal to regular users.
In addition, Apple has simplified the process of using extensions in two ways. First, once an extension has been downloaded, all it takes to install it is a simple double-click. The days of magical incantations, setup wizards, or copying files to obscure locations are simply over.
Second, Safari will refuse to install any extension that has not been signed with a digital certificate issued by Apple. Thus, in order to distribute extensions that others can use, developers must register for the Apple Developer Connection program and obtain a certificate that, at least in theory, could be withdrawn by the company in the event that a developer did not comply with any of Apple’s terms and conditions.
The terms for creating extensions aren’t as restrictive as the terms that iPhone developers must agree to in order to sell their apps through the App Store; they mainly include a number of requirements designed to make extensions safe, such as avoiding malware, unauthorized data collection, and so on.
New in Safari, but old-school in Firefox
Of course, extensions are not a new concept—Firefox has supported them for years and now sports a rich ecosystem of add-ons that’s arguably one of that program biggest advantages. What's more, the Mozilla foundation, which develops Firefox, has integrated the process of installing extensions directly into the browser, so that users are provided a central location where they can discover extensions and from which they can be downloaded and installed seamlessly.
Apple appears to be prepping a similar system, which it terms the Safari Extensions Gallery. While the full details aren’t yet known, the company says that users will be able to submit their extensions to the gallery, which will open later this summer.
Despite its first-mover advantage, Firefox suffers from some significant limitations that Safari has already overcome right off the gate. For example, the user interface of Firefox’s extensions must be built using a language called XUL, which, although open-source, is certainly not as widely known as HTML. In addition, the process of developing extensions remains somewhat manual, whereas Safari 5 comes with a built-in package called Extension Builder that provides a visual, step-by-step process for packaging all the necessary files into a distributable extension package for users.
Finally, Safari developers can digitally sign their extension through an easy-to-use process that also happens to be completely free. Firefox extensions can also be signed, but developers need to follow a manual process and must purchase a code-signing digital certificate, which can cost several hundred dollars per year, from a third party. As a result, the vast majority of Firefox extensions are unsigned, while every single Safari extension will be signed. And, while a digital signature doesn't necessarily mean better performance or security, it does give users a measure of safety in knowing that Apple at least has the option of pulling an extension that is unsafe or malicious.
It's still too early to say whether extensions will catch on and become an important part of the Safari ecosystem. Their introduction, however, kicks Safari's capabilities up a serious notch and represents a direct move against Firefox, although the latter has a considerable lead and a well-established reputation as an extensible browser that are going to be difficult to overcome.
Updated at 5:18PT with information about how to enable extensions.
[Frequent Macworld contributor Marco Tabini is a web specialist based in Toronto.]