The Future of XUL

An Introduction to the Elusive XRE

Ever since the first XUL app was written, developers have wished for an ability to write "real" applications in the language. At XulPlanet, people often tell us that they find XUL to be a great language to write browser plugins in, but they want to write independent programs with it. Usually, we try to explain to them that they /can/ write real applications in XUL, and the fact that they think otherwise is just a misunderstanding. The problem is, that is only half true. Although you currently can write applications in XUL that have nothing to do with web browsing, you still cannot write real programs, completely autonomous, with their own resources, own executables, and own install directories. However, that is about to change.

XRE stands for XUL Runtime Environment; headed by four netscape developers, the XRE plans to piggyback on the GRE (Gecko Runtime Environment) project to create a system via which, rather than installing mozilla the browser an a system application, an end user would install mozilla the platform as a system toolkit, much like a windows under might install Microsoft DirectX today. After installing the XRE platform, he would then be able to install any number of XRE applications such as Gecko (mozilla the browser), Phoenix, XulNote, MozOffice, etc. Each of these applications would be installed to a separate directory (e.g., /internet/phoenix/ or /office/mozoffice/) chosen by the user according to his favorite directory naming scheme. Each application would have its own executable file (e.g., /internet/phoenix/phoenix.exe or /office/mozoffice/mozoffice.exe) and will be dealt with just like any other installed application.

From the programming side of things, all the code for the application will still be contained as XUL, javascript, and other resources in a jar file, along with XPCOM interfaces, which can either be installed globally (so that any application can use them) or locally (so that only the application who installed them can use them). This means that the process of developing a XUL application will be mostly the same as it is now, with the only added step being the of creating the executable file for the program. This will probably be done via some sort of an SDK, perhaps a programs that takes the application details as input and creates the executable automatically. The actually executable files will be very small, containing only the code required to load the XRE and startup the XUL app.

The main difference here is how the end user sees the process. It's very simple for a person or company to say that an application required mozilla version whatever to run; people are used to that type of thing; applications distributed on CDs can even include an appropriate version of mozilla with the installation program, and install it automatically if one is not detected on the user's machine. Currently distributing a XUL application on a disk to a large audience would be must more difficult (to the point where no one has to my knowledge ever done it) because of the weirdness of the current XPApps setup and the fact that almost no one (from a general public perspective) actually has mozilla installed on their system. XRE should change that.

When I asked about timetables, I was told that all this should be happening within six months from now. If you are taking the "I'll believe it when I see it" attitude I don't blame you, since mozilla 1.0 was "six months away" for about a year and a half before we finally got it released.. However, unlike most of what's on mozdev, this is a real official project with real people putting real time into it on a regular basis. That means that although there may be delays in the process, they won't be indefinite delays. The XRE will happen, and will happen soon, and when it does, XUL developers everywhere will engage in loud rejoicing.

Copyright © 2002