O'Reilly Network    
 Published on O'Reilly Network (http://www.oreillynet.com/)
 http://www.oreillynet.com/pub/a/network/2000/05/19/magazine/mozilla_vm.html
 See this if you're having trouble printing code examples


Mozilla as an Application Virtual Machine

by David Boswell
05/19/2000

There's been a lot of discussion inside the Mozilla community about the true nature of this project. The stock answer has been that Mozilla is the Open Source development project that began when Netscape released the source to its Communicator browser suite in 1998. Although that is what Mozilla started out as, there's growing evidence that it has turned into something else. In many ways Mozilla now resembles an Application Virtual Machine, a piece of code that allows applications to be written once and run on any operating system.

In his keynote address given at Computers, Freedom and Privacy in Toronto, Canada, on April 6, 2000, Tim O'Reilly talked about Open Source software and how the vision of Open Source projects tends to change over time. "Many of the greatest successes," he said, "come not from the vision of the original designer, but the uses to which newcomers put the original tool."

As an example, O'Reilly went on to cite that the scripting language Perl didn't blossom until the Web came along and developers found new ways to apply it. Along those same lines, we're seeing Mozilla break ground in new areas not previously expected, such as Zope (a web content management platform) and Eazel (a next-generation Linux desktop).

Related Articles:

How to Change Your Look With Mozilla Skins

XUL Tools and What They Mean

Now that the preview release of Netscape 6 has been released, Mozilla concepts are reaching a whole new audience: people who have no experience with the previous two years of the project's development. As these people use Mozilla and the Mozilla-derived Netscape 6, they are bringing new perspectives and ideas about the project to the Web community. Many of these new users are not programmers, but are largely developers in the Web community with skills in HTML, JavaScript, and other Web technologies. Their views have stretched the original vision.

Building Applications in Mozilla

Web designers are discovering that their skills can now be used to customize Mozilla in such a way that they are able to create their own applications. One of the greatest innovations in Mozilla has been the creation of a cross-platform front end (called XPFE) that has turned the user interface of Mozilla into a Web page. The look and feel, as well as the functionality, of the interface is created entirely out of standards that are used to created Web pages -- JavaScript, Cascading Style Sheets, and XML. The XML component is embodied in a new language called XUL, the XML-based User Interface Language.

These tools have enabled new levels of customization including:

By combining both of these features, it's possible to change the way Mozilla looks and feels to such a degree that it can be turned into anything: a spreadsheet, a word processor, or even a different type of browser. And the kicker is that these applications can run on virtually any platform.

Extremely Portable

Mozilla is extremely portable; it already runs on Windows, Macintosh, and most flavors of Unix, as well as less well-known operating systems such as BeOS, OS/2 and Mac OS X.

Basically, any viable operating system today either has a version of Mozilla running on it or has a project underway to port Mozilla. Applications written using Mozilla naturally take advantage of this, so they will run on Windows as well as Linux without any modifications to their code. In this sense, Mozilla is acting as an Application Virtual Machine by allowing them to be written once and run anywhere.

An example of Mozilla's flexibility appears in the Script Editor. This gem shows how XPFE can be used to create a new tool out of Mozilla. The Script Editor is a Web-based application created on top of the Mozilla codebase that's designed for editing HTML, JavaScript, PHP, XUL, or potentially any other programming or scripting language.

Although it's just a prototype, the Script Editor already has an advantage over every other similar major application in the market today. Neither FrontPage, Homesite, BBEdit, Dreamweaver, GoLive, or Emacs runs on nearly as many different platforms as the Mozilla-based Script Editor does.

This is just one example of Mozilla's portability. The bottom line is that applications which are built on top of Mozilla's code base are inherently cross-platform from the start.

Why use the Term "VM" to Describe Mozilla?

"Virtual Machine" is borrowed from the philosophy behind the Java technology, a computer language designed to run on any platform that has an operating-system-specific layer, called a Java Virtual Machine, installed on it.

This reference to Java is a reference of semantics, not of technology. The specifics of how Java works are not being emulated by the Mozilla developers, but the similarities do exist between these two technologies in their cross-platform nature.

Of course, by using this terminology there's the potential to have a negative association with Java's perceived inability to deliver what it promised when it was first introduced to the Web. To avoid this problem, it might be beneficial to preserve the idea of an Application Virtual Machine by using some different wording.

So, whatever this powerful tool used to create cross-platform applications ends up being called, clearly Mozilla is more than just Netscape's latest browser. For two years Mozilla has been in the domain of programmers working with mountains of source code. Now that Mozilla and Netscape 6 are gaining notoriety and understanding within the Web community, people are beginning to realize that the results of the past two years could have a far more positive impact on web communications than ever imagined.

David Boswell has been involved in the Mozilla community for more than six years. He is also a coauthor of Creating Applications with Mozilla and helped launch mozdev.org.


Discuss this article in the O'Reilly Network General Forum.

Return to the O'Reilly Network Hub.

Copyright © 2007 O'Reilly Media, Inc.