Didn’t Netscape lose the browser war? Mozilla, the technology that lies underneath Netscape products and a slew of its own products, just gets better and better. Netscape is effectively dead, but Mozilla keeps on keeping on. Here’s a look at why.
In 2010 we’ll look back and say 2003 was the year that Mozilla really began. Mozilla-based products have attracted many flattering reviews and several industry awards this year. At the same time, Microsoft’s Internet Explorer and Outlook Express, which are Mozilla’s most obvious competitors, are moribund at best. At worst, they’re buggy, security compromised and virtually abandoned by Microsoft.
This year, in just about every calendar quarter, the Mozilla Foundation, the Mozilla community and their friends have pumped out a regular minor release. The Mozilla Application Suite is 1.6 now, and the stand-alone Mozilla Browser (Firebird) and Mozilla E-Mail & News Reader (Thunderbird) are motoring steadily toward their own 1.0 releases. Mozilla technology is now very stable, very efficient and full of whizzy features.
If that were all, we’d expect the party to start drifting apart before too long. Such is not the case at all. The Mozilla Foundation is well funded and has lots of friends. Rather than finishing up, something far more interesting has happened this year. Mozilla is maturing into a software-development platform. That means many, many applications are likely to follow.
It seems obvious in hindsight. With user clients like e-mailers, HTML composers, calenders, debuggers, chat applications and address books, Mozilla must be far more than just a Web browser. And it is. The Mozilla Browser is built on top of the Mozilla Platform. Just look in the “chrome” directory of your current Mozilla install to see the browser sitting there as a single file called communicator.jar or browser.jar. Those files are just ZIP archives, each holding a set of human-readable text files.
The Mozilla Platform itself is a set of programmable objects and XML processors bound together into a single program. Applications that exploit this platform consist of images, XML and text files that are interpreted at runtime when the platform starts. Start the platform with one file name as an argument, and a browser appears. Start it with another file name, and an e-mail client appears.
The first key to unlocking the value in the Mozilla Platform is to see graphical user interfaces — most commonly called GUIs — from a new angle.
XML: The Natural Solution for GUIs
It’s always the hardware that does it. Desktop hardware has gotten faster, and now a program doesn’t need to drive its graphical user interface from fast, compiled code. Slower, interpreted code will do. Mozilla’s trick has been to mash together two concepts: GUIs and XML. The result is XUL, a dialect — technically an application — of XML. A document that is XUL describes the GUI of an application in plain text using XML tags like “toolbar,” “menu,” “key” and “window.” HTML doesn’t have these tags. When you display this document, the result is a standard application GUI window, not an HTML page in a browser window. That is a breakthrough.
XUL works because of a golden rule of programming: If a system allows a programmer to state the answer to a problem in a very simple way, then that system is a hit. The simplicity of the command line was a hit for keyboard users of early Unix and of DOS; the simplicity of SQL is a hit for databases; the less obvious but still simple e-mail message header format specified by RFC 622 is a hit for network messages. Likewise, the combination of XML and a set of GUI widgets is a hit for user-oriented GUI clients. To see it at work, just open the address book of the Mozilla e-mail client. That new window is painted on the screen from a set of XUL tags.
Mozilla’s XUL has been so successful and so influential that most vendors of GUI development systems, like Microsoft and Macromedia, now offer an XUL clone or an XUL alternative of their own — XAML and Flex, respectively. One day, all but the most specialized applications will have their visual user interfaces specified this way. It’s the future.
Mozilla and Portability
This portability is the same as that of Web pages. It is most welcome, not only because it bridges the Windows-Linux divide, but also because it reenables many disenfranchised platforms like OpenVMS, OS/2 and even such niches as the Amiga. Those operating systems can run any Mozilla application provided there is a port of the Mozilla Platform for that system. Only the Amiga is yet to be completed.
Complementing these portable standards is a set of objects built into the Mozilla Platform. Depending on how you count them, there are somewhere between 1,000 and 3,000. These objects provide the back-end facilities required of any serious application, such as Web connectivity and file access. These objects are available on every platform as well, so the Mozilla Platform looks overall a little like the Java environment.
Because the Mozilla platform is not quite as isolated as the Java environment, its performance can also be better in some cases. The platform also integrates more easily and naturally with native desktop features like accessibility systems, window managers, drag-and-drop features and theme engines.
No doubt Microsoft has a dim view of yet another cross-platform technology that seeks to trivialize the operating system underneath. Both Microsoft’s .NET initiative and the Longhorn release of Windows contain elements designed to entice programmers away from the simple engine-based system that Mozilla offers. The last thing Microsoft wants is for all future software applications to be served from a standards-based Web server into an OS-independent viewing system like Mozilla. Even worse, such a system can run locally without any Internet connectivity. It’s as though Microsoft lost control of Visual Basic.
Usually, building a platform that is cross-platform is very difficult to do perfectly. This is because the GUI widget sets offered by platforms are subtly different. A Windows button just isn’t the same as a Macintosh button. There are hosts of tiny variations. Together, these restrictions usually conspire to kill any portability strategy.
Mozilla, however, has bent over backward to be portable. The widgets it uses in the GUI are hand-crafted, not borrowed from the operating system. It uses the absolute minimum of Windows services on Windows. It even avoids Windows features that are easy to lean on, like leaving multiline layout of text to the GDI subsystem. Mozilla won’t touch a Windows feature if it can do without it. It will support a feature if that’s a competitive thing to do. And then it will support it on all other platforms if possible.
Probably the most offensively portable thing Mozilla does is to reimplement Microsoft’s COM from the ground up. COM — now called ActiveX — is Microsoft’s standard glue used extensively between applications. A completely separate implementation is both a cheeky and technically demanding feat. When Mozilla runs on Windows, there are two COMs: Microsoft’s and Mozilla’s. Even more cheekily, Mozilla’s portable engine makes its version of COM (called XPCOM) available on all non-Windows platforms.
So Linux and BeOS now have an implementation of COM if they want it. The icing on the cake is that many traditional Visual Basic programmers are wedded to COM. Mozilla provides an alternative upgrade path for those VB-heads who don’t want to absorb the complexities of .NET or Longhorn.
A Pause for Breath
For end users, all this competition might be invisible in the end. After all, if you can’t tell a Mozilla application from a native Windows one, what difference does the underlying implementation make? Probably not much, unless you’re on Linux, where applications are still growing rapidly.
From now on, though, look for portable or new applications with that certain Mozilla feel. We’re already seeing the beginnings of support-center call-tracking systems and customer-database systems. Not all will be free, and not all will be public, but some will be both. For Mozilla programmers, creative Web developers and others, these are interesting times indeed.
Mozilla cranks up the operating-system wars yet another notch with its highly standards-focused and standards-compliant implementation. If you don’t want to develop an application, there’s still a great Web browser to play with. Enjoy.
Nigel McFarlane is a freelance science and technology writer with an extensive programming background. His latest book is Rapid Application Development with Mozilla (Prentice Hall, 2003). Contact him at firstname.lastname@example.org.