09 Jun 2005

I took a few minutes to play around with XUL, which is an XML format for describing user interfaces. Mozilla uses it for defining the GUI:s in Thunderbird and Firefox, which proves that it's possible to make rather complex and good looking interfaces with it. Here's the test code I made. (Firefox only.) Note that it's written in XUL, not HTML! Use View Source to see how it is done. It displays a menu, a list box and two buttons. There's also some big red ugly text to try out style information. The functionallity is made in JavaScript. In a real application I guess you let the JavaScript call the application code, which is written in another language.

While this example doesn't look very impressive, XUL looks like a useful language for cross-platform user interfaces. It works a lot like HTML, but is specifically made for proper GUI:s. Coupled with JavaScript and the DOM model, it's an interesting alternative to DHTML and proprietary solutions such as Flash and Director for making web applications. It's also an alternative way to do GUI:s for "traditional" client-side applications. One nice feature of it is that it decouples the GUI more from the logic code. You can let a JavaScript kid implement the GUI, and let the C++ (or whatever) programmers concentrate on the application logic.

My code was based on this tutorial.

blog comments powered by Disqus