Mozilla is not just a web browser. It is also a framework for building cross-platform applications using standards such as Cascading Style Sheets (CSS), XML languages such as the XML-based User-interface Language (XUL), eXtensible Binding Language (XBL), and Resource Description Framework (RDF).

Gecko, Mozilla's rendering engine, is used as part of the framework, along with other technologies such as XPConnect and XPCOM, Mozilla's component model. The Mozilla development framework also uses programming languages such as JavaScript, C++, C, Python, and Interface Definition Language (IDL).

The Mozilla framework is used to create Netscape's Mozilla-based browsers (Netscape 6.x and 7.x), other browsers such as Galeon and Camino, and chat clients like ChatZilla and JabberZilla. Developers also use Mozilla to create development tools, browser enhancements, games, and other types of add-ons and applications.

This book explains how applications are created with Mozilla and provides step-by-step information that shows how to create your own programs using Mozilla's powerful cross-platform development framework. It also includes examples of different existing applications to demonstrate the possibilities of Mozilla development.

1. Mozilla Background

When Netscape Communications Corporation was founded, it planned to create a better version of NCSA's Mosaic browser, the first application that made accessing the Internet possible for ordinary users. This new application would be a Mosaic Killer. In time, the word "Mozilla" became the shortened version of this phrase and the code word for Netscape's browsers.

Mozilla has become more than a reference to one of Netscape's products. On March 31, 1998, was launched as the site where the development of Netscape's next-generation Communicator 5.0 browser suite would take place. At that point, Mozilla became an open source project and began to take on a life of its own beyond its origins at Netscape.

When Netscape released its Communicator code to the open source community, it did something that was never done before: no other major software company had given away the source code to a proprietary product. At the time, many people in the software industry and the press debated the wisdom of this decision.

Many other companies have followed Netscape's lead and released their own products to the open source community. Sun Microsystems sponsors several projects, including and Apple also bases the core of its new operating system on an open source project called Darwin, hosted at

A year after the Mozilla source code was released, Mike Homer, a senior executive at Netscape, made the following comments: "Mozilla is larger than Netscape, and that was its intention. Mozilla is essentially a collaborative project that was sponsored by a commercial entity. Some of the people that staff are Netscape employees, and the code that was contributed was code previously owned by Netscape. However, it's also true that the code base will take on a life of its own someday."

Since the project's launch, many people outside Netscape have joined the community, although many Netscape (now AOL) employees still contribute to its advancement. The Mozilla community is growing beyond the original home of Other community resources worth examining include, an advocacy and news site, and, a project-hosting site for Mozilla applications.

Several companies, including IBM, Red Hat, ActiveState, and Sun Microsystems have also contributed to the Mozilla community. For instance, Red Hat has provided support for Mozilla because it wants to help drive development of an open source alternative to the closed source Netscape 4.x browser suite that they had included in their Linux distribution. AOL has also explored the use of Mozilla in its latest CompuServe and AOL clients.

Because all Mozilla source code is made available to anyone who is interested, the community benefits from an increase in the number of suggestions, bug reports, patches, and new developers. Along with the people who were involved with the project when it was first released as open source, the new people and companies that joined the community have helped shape the direction and outcome of the Mozilla project.