8.1. Hacks 84-90This chapter describes how to create and deploy Firefox enhancements properly. Enhancements include skins, themes, extensions, and applications. This chapter covers the creation of JAR and XPI files, their contents, and the web site features that are used to deliver them. Firefox browser windows (and other Firefox windows) can be compared to the command-line environment. Just as a command-line interface can be used to start many different programs, so too can Firefox windows. They are good places from which to launch other applications or enhancements. Such applications can be started through Firefox's menu system, the keyboard, or the mouse, and they can be trivial or complex. They can be highly integrated with Firefox, like extensions, or they can be mostly separate, like the DOM Inspector. The Firefox web browser is also Internet-enabled and is therefore a kind of application portal for applications that are local, remote, or remotely installed. The concept of being able to launch your own application (or simple feature) from a widely used and free application portal like Firefox is very attractive to some service providers. Firefox provides them with an automatic deployment mechanism. To build a quality enhancement that can be invoked from a Firefox window, the content that makes up that enhancement must be built out of chrome technology: XUL, CSS, JavaScript, and images. That content must then be annotated and bundled up correctly, using RDF, so that when Firefox first gets itusually through a URLall the right bookkeeping is done in the small text files that Firefox maintains. With that bookkeeping in place, the extension (or application or theme) can reliably be made available to the end user. This chapter is mostly concerned with explaining how that bookkeeping is done correctly. Chapter 7 takes a more immediate look at how to build chrome content. The introductory concepts described in [Hack #75] also apply to this chapter. The main difference is that this chapter requires more organization and more discipline. |