Cool XUL Provides Cross-Platform UI

February 29, 2000

Edd Dumbill

Eric Krock from Netscape presented a session Tuesday afternoon on the XML User Interface Language, XUL (pronounced "zool"). XUL is part of the Mozilla open-source browser project.

Krock said that the maturation of W3C XML standards and support for them is what has made XUL possible. Reliable conformant implementations of the standards across platforms can finally enable a truly cross-platform UI toolkit to be built on top of them.

XUL itself is not framed as a standard; rather it is a technology invented by Netscape and Krock said that, after the Mozilla browser ships, Netscape intends to submit XUL as a potential standard. He was taken up on this sooner than he expected: in the question-and-answer session afterwards, a representative of the W3C Working Group on XForms asked for someone working on XUL to join the group.

So what does XUL do? Essentially it provides a language to describe a user interface, with many more widgets than are provided in HTML itself. Such widgets include tree controls, scrollbars, and splitters. A user interface description ("package") contains various elements that control the interface appearance and behavior:

  • Content: the description of the widgets in an interface
  • Appearance: CSS styles dictate the appearance of the widgets
  • Behavior: specified either in JavaScript or via native code (C++)
  • Locale: interface localization information
  • Platform specifics information

XUL is implemented from within the Mozilla browser: it is in this framework that XUL applications run.

Krock said that the use of XUL has several benefits: in addition to being cross-platform, it also has the potential to define cross-device interfaces; XUL can be used to build small quickly-downloadable applications, leveraging the power of the browser environment; and finally, it adds to web browsers UI elements that HTML does not provide. He also mentioned that XUL has the potential to "democratize" application interface design, bringing it further into the grasp of a designer accustomed to HTML and JavaScript.

What applications of XUL currently exist? The primary application of XUL at the moment is in the Mozilla browser, where all the user interface widgets are implemented using it. This means that in Mozilla all the style and chrome (interface "furniture") can be controlled using XML, CSS, and other standards. Consequently, the Mozilla browser has "pluggable chromes": just plug in a different XUL package to change its look and feel. For instance, this is how the shipping of separate Netscape and Mozilla browsers will be affected.

Another XUL-based project currently underway is the creation of a Zope management interface using XUL. This shows the potential of XUL to provide a more expressive, and therefore efficient, interface than is possible with HTML + JavaScript alone.

Krock also mentioned the possibility of dynamic server-cached user interfaces. In scenarios where a network connection is guaranteed, an application's user interface can be fetched from a server at startup time.

While XUL certainly gets the "Wow!" factor right, as Mozilla has not yet reached beta, it's still a little early to tell what impact XUL may have on the Web. It has the potential to simplify user interface construction and expand the number and variety of web applications, but ultimately it will live or die based on the adoption of the Mozilla browser.

More information on XUL: