XUL, language for building graphical interfaces
XUL allows to create cross-platform, graphical user interfaces for standalone
applications. It is a standard and portable format, working on any operating system, but
is rather difficult to use.
XUL means for "XML-based User interface Language". This is a semantic XML extension for building graphical interfaces, created by Mozilla in 1999.
XUL seemed destined to become a universal language for describing graphical interfaces. But Microsoft has created his own version, XAML. In addition, the developers have never sought to share the development with third-party tools, which resulted in a plethora of user interfaces languages based on XML. Finally HTML 5, thanks to Canvas, multimedia tags, and frameworks able to add new tags to HTML, has become a valid alternative. The future of XUL so seems confined to Firefox and Mozilla tools.
Based on web standards, but complex
The use of RDF and XPCom in particular makes it a tool difficult to master.
- The code is interpreted.
- Uses bitmap graphics.
- Events (a mouse click for example) are properties of tags and tags are components of the interface.
- Style properties are defined inside standard CSS files.
- Component (mainly the "widgets", graphical components) may be define by user, in XBL or XPF files.
- The RDF format is user to store and deliver texts, for localization for example.
- XPCom is used for the wrapper between XUL and libraries written in various programming languages.
- It is possible to include HTML code in XUL and then run locally on XULRunner a Web application.
Displaying "Hello world!":
<?xml version="1.0"> <windows width="600 height="480"> <description> Hello World! </description> </windows>
Drawing a button:
<button label="Close" oncommand="window.close()" />Tools and documentation
Download the runtime.
- XUL on Mozilla
Official website. Mozilla is the creator of the language.
- XUL tutorial
With examples and source code. Explain How to install a XUL application.
See also XAML, the Microsoft version of XUL.