The Mozilla toolkit


Index


What is Gecko?

The embeddable, cross-platform Gecko rendering engine is the heart of Mozilla. It has no user interface; it just understands web content and displays it. This ability is valuable in an enormous set of applications, some of which have little to do with a “browser.” For example, Gecko (in concert with XUL; see below) is used to display the user interface of Mozilla applications.

Gecko began development in 1997 and has evolved into a lean, fast and robust layout engine that features an architecture that is open, portable, extensible and customizable. It has been embedded in a variety of third-party software and hardware products, from HTML-to-PNG converters to commercial IDEs. Gecko serves as the rendering engine for the latest Compuserve 7.0 service, and is the engine in the recently released Netscape 7.0 Preview Release and a beta test for the AOL service.

Other examples include several projects that are pure browsers:

More technical information on embedding Gecko is available on pages both at mozilla.org and at codeguru.com.

What is XUL?

XUL (eXtensible User-interface Language) is Mozilla’s XML-based, cross-platform user-interface technology.

This technology enables developers to define cross-platform graphical user interfaces using a mixture of XML, HTML, CSS and ECMAScript (JavaScript). A user can modify any aspect of the user interface of an XUL-based Mozilla application (such as the Mozilla product itself) simply by modifying files that use standard web-page syntax.

XUL uses Gecko to implement the defined user interface. The Gecko/XUL combination is the foundation that allows a Mozilla application to extend from being as simple as a web page to being as sophisticated as the Mozilla 1.0 product. It supports all the basic elements found in contemporary graphical user interfaces, including menus, input controls, dialogs and tree controls (as seen, for example, in the preferences dialog), and keyboard shortcuts.

An XUL tutorial can be found at XUL Planet. There is also a set of slides about Building Applications with XUL and JavaScript, accompanied by some more detailed technical information (1; 2). More information is also available at mozilla.org.

What is XPCOM?

Mozilla components are XPCOM components. XPCOM (Cross-Platform Component Object Model) was first created as part of the Mozilla project and is now used by several other projects. XPCOM is a lightweight cross-platform variant of the well-known Component Object Model (COM). An article at IBM’s website discusses the matter further.

All XPCOM objects automatically gain an ECMAScript (JavaScript) wrapper, so most Mozilla developers will enjoy the cross-platform and other development-related benefits XPCOM provides without ever having to worry about XPCOM itself.

What is Necko?

Necko (rhymes with “Gecko”) is Mozilla’s network library. It provides a platform-independent API for several layers of networking ranging from transport to presentation layers. Components within the library include standards-based implementations of protocol handlers (HTTP, FTP, etc.) and several core networking functionalities, including DNS, authentication, proxy connections and caching.

The API is used in the Mozilla product and can also be used to write other networking clients. More information on the Necko network library is available at http://mozilla.org/projects/netlib/.

What is Imagelib?

The image rendering library (Imagelib) decodes various image formats so they can be displayed by Mozilla. It is completely modular and standards compliant, and includes support for popular image formats such JPEG, PNG, GIF, and PPM (Portable Pixel Map).

Why is JavaScript (ECMAScript) such an important part of the Mozilla toolkit?

JavaScript is a widely used scripting language originally developed at Netscape; it has now been standardized by the ECMA-262 committee as “ECMAScript.” It is ubiquitous not only on web pages but also with server applications.

Mozilla provides two implementations of JavaScript: the original and most widespread implementation is written in C and is embedded in the Mozilla browser, while the second implementation is written in Java. Information about JavaScript implementations, standards, test suite, tutorials and newsgroups can be found at http://mozilla.org/js/.

In terms of the Mozilla toolkit, the JavaScript debugger, Venkman, provides a powerful JavaScript debugging environment for Mozilla-based browsers (excluding Gecko-only browsers such as K-Meleon and Galeon).

As it has been developed to date, Venkman allows developers to do the following:

Additional information on Venkman, including a walk-through, can be found at http://mozilla.org/projects/venkman/.

What are the key benefits of using the Mozilla toolkit?

A Mozilla application runs unchanged and fully functional on any supported Mozilla platform.

Mozilla is entirely open source/free software, which provides many consequent developer benefits. For example, widely used open source code tends to be more robust and secure than proprietary software

And if there is a bug, a developer is empowered to inspect the code and fix the problem (and preferably check the change in for the benefit of all: “give to the code and it will give back to you”).

Mozilla all but removes the distinction between desktop applications and web pages, which leads to several further benefits. A developer who currently does desktop application programming, with its pervasive reliance on elements such as components, APIs, objects, events, methods, properties and sophisticated graphical user interfaces, will find an hospitable programming environment. However, much more of the technology will be based on consensual standards, the full power of web design will be directly available for enriching the user experience and the application will be cross-platform.

Conversely, many web designers will find that they can evolve their skills to develop full-blown applications without needing to jump out of the territory familiar to them.

What developer tools are built in to Mozilla?

Mozilla 1.0 contains a DOM inspector (for which a tutorial is also available), JavaScript debugger, Java and JavaScript consoles, and syntax-highlighted View Source.

What security does the toolkit use?

Security in Mozilla starts with NSS, the Network Security Services library written by Netscape engineers. This library, which predates the 1998 “Free the Lizard” campaign, benefits from:

Layered on top of NSS is the Personal Security Manager (PSM). PSM performs cryptographic operations on behalf of a client such as Mozilla and is accessible as a component using ECMAScript (JavaScript).

Who should OEMs wishing to use the Mozilla codebase contact for additional information?

OEMs interested in using the Mozilla codebase can contact Mitchell Baker, mozilla.org’s Chief Lizard Wrangler.