XUL - Building Graphical Interfaces
XUL means for "XML-based User interface Language". This is a semantic extending XML for building graphical interfaces . Has been created by Mozilla in 1999.
Features of XUL
-
The code is interpreted.
- JavaScript code may be embedded into xml to define functions called by events.
-
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.
Why to use XUL?
XUL allows to create cross-platform, graphical user interfaces for standalone
applications.
Mozilla has developped Prism,
a tool for accessing XUL Web applications from the desktop.
It is a standard and portable format, working on any operating system, but
is rather difficult to use.
Sites and tools
- Xul.fr
Site dedicated to XUL and Ajax. - Comparisons
Comparing XAML and XUL and other XML graphical interface languages. - XulRunner
Download the runtime. - Installing
How to install a XUL application. - Mozilla
Official website. - XUL tutorial
With examples and source code. See also the tutorial from Mozilla, the creator of the language that is similar to that of XULPlanet.
Sample code
|
Hello world
|
<?xml version="1.0">
<windows width="600 height="480">
<description>
Hello World!
</description>
</windows>
|
|
Draw a button
|
<button label="Close" oncommand="window.close()" /> |
