'XUL' (pronounced ''zool'' ()), the '''X'ML 'U'ser Interface 'L'anguage'', is an
XML user interface markup language developed by the
Mozilla project for use in its cross-platform applications, such as
Firefox. The only complete implementation of XUL is the
Gecko layout engine.
XUL relies on multiple existing web standards and technologies, including
CSS,
JavaScript, and
DOM, which makes it relatively easy to learn for people with a background in web programming and design. XUL and web developer documentation is available from the
Mozilla Developer Center [1].
XUL has no formal specification or interoperable non-
Gecko implementations and therefore may be described as an internal or proprietary language. On the other hand, its implementation (Gecko) is open source and Mozilla provides experimental
XULRunner builds to let developers build their applications on top of the
Mozilla application framework and XUL in particular.
The main benefit of XUL is that it provides a simple and
portable definition of common
widgets. This reduces the
software development effort in a way
analogous to the savings offered by
4GL tools. For more information, refer to the
Joy of XUL article on developer.mozilla.org.
Other
user interface markup languages are
MXML,
Laszlo XML,
UIML, and
XAML.
XUL documents
A XUL interface is typically defined to consist of three discrete sets of components:
★ ''Content'': The XUL document(s), whose elements define the layout of the user interface.
★ ''Skin'': The CSS and image files, which define the appearance of an application.
★ ''Locale'': The files containing user-visible strings for easy
software localization.
XUL elements
XUL defines a wide range of elements, which roughly belong to the following types:
; Top-level elements: e.g.,
window, page,
dialog,
wizard, etc.
; Widgets : e.g., label,
button,
text box, list box,
combo box,
radio button,
check box,
tree,
menu,
toolbar, group box,
tab box, color picker, spacer, splitter, etc.
; Box model: e.g., box, grid, stack, deck, etc.
; Events and Scripts: e.g., script, command, key, broadcaster, observer, etc.
; Data source: e.g., template, rule, etc.
; Others: e.g., overlay (analogous to
SSI, but client side and more powerful), iframe, browser, editor, etc.
It is possible to use elements from other applications of XML within XUL documents, such as
XHTML,
SVG, and
MathML.
Some common widgets -
(sometimes called slider),
(spinbox), time and date pickers - have been added during Gecko 1.9 development cycle
[1].
XUL applications
While XUL is mostly used for creating the Mozilla applications and their extensions, it is possible to use it for
Web applications transferred over
HTTP. One of the most well-known XUL applications of this type is the
Mozilla Amazon Browser, which provides a rich interface for searching books at
Amazon.com.
However, many of the powerful features of Mozilla, like privileged
XPCOM objects, are not available to unprivileged XUL documents (unless the script is
digitally signed and user granted certain privileges to the application), and such documents also suffer from various limitations of the browser, such as the inability to load remote XUL, DTD, and RDF documents.
Because the only full implementation of XUL is
Gecko, such applications are inaccessible to users of browsers that are not based on Mozilla.
Trivia
THERE IS NO DATA. THERE IS ONLY XUL. |
The XUL name is a reference to the film ''
Ghostbusters'', in which the ghost of an ancient
Sumerian deity called ''
Zuul'' possesses the character Dana Barrett (played by
Sigourney Weaver) and declares, "There is no Dana, only Zuul". Since XUL is unusual in using XML to define an interface, rather than a document, its developers adopted the slogan: "There is no data, there is only XUL". This is referred to by the
XML namespace URI at the beginning of every XUL document:
:
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul
When viewed with a XUL-capable application, the document pointed to displays the slogan in large letters in the center of the screen (similar to that to the right).
"Keymaster" and "gatekeeper" are also references to the same plotline. This is not the only reference to Ghostbusters within Mozilla - for instance, the JavaScript
debugger component is called
Venkman, after
one of the main characters in the film.
See also
★
XBL, an XML-based markup language used to declare the behavior and look of XUL widgets
★
Mozilla application framework
★
XULRunner
★
Mozilla Amazon Browser
★
List of user interface markup languages
★
Comparison of user interface markup languages
★ Third-party projects, related to Mozilla XUL.
★
★
KaXUL
★
★
xulfaces
★
★
libufo - OpenGL GUI toolkit, including partial XUL interpreter
[2]
External links
★
XUL documentation on developer.mozilla.org
★
XULPlanet — A developer site with tutorials, references and forums
★
XUL Periodic Table — Visual demonstration of XUL capabilities (Requires an XUL-enabled browser such as
Mozilla Firefox)
★
XUL and XML — How to use XUL
★
XulBooster - An XUL plugin for
Eclipse IDE.
★
DXUL — The home of DXUL, the experimental
DHTML XUL interpreter
★
GUL — Gul 2.0 project page, partial XUL interpreter for phpgtk 2
★
XUL Tag and Attribute Frequency of Firefox — The statistics of tag and attribute frequency extracted from Firefox 1.5.0.4
★
ZK - A GPLed Web 2.0 framework which uses XUL for the GUI definition.
References
1. Firefox 3 for developers