In
computer programmingComputer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language. The code may be a modification of an existing source or something completely new...
,
XUL (pronounced
zool ), the
XML User Interface Language, is an
XMLXML is a set of rules for encoding documents electronically. It is defined in the produced by the W3C and several other related specifications; all are fee-free open standards....
user interface markup languageA user interface markup language is a markup language that renders and describes graphical user interfaces and controls. Many of these markup languages are dialects of XML and are dependent upon a pre-existing scripting language engine, usually a JavaScript engine, for rendering of controls and...
(developed by the
MozillaMozilla is a term used in a number of ways in relation to the now-defunct Netscape Communications Corporation and its related application software, including the Mozilla.org group and its successor the Mozilla Foundation....
project) which operates in Mozilla cross-platform applications such as
FirefoxMozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. Firefox has 23.75% of the recorded usage share of web browsers , making it the second most popular browser in terms of current use worldwide after Microsoft's...
and
FlockFlock is a web browser built on Mozilla’s Firefox codebase that specializes in providing social networking and Web 2.0 facilities built into its user interface...
. The Mozilla
GeckoGecko is a layout engine currently developed by Mozilla Corporation, known as the layout engine of the Firefox web browser, Mozilla Application Suite, Nvu, Mozilla Thunderbird and many more...
layout engine provides an implementation of XUL used in the Firefox Browser.
XUL relies on multiple existing web standards and technologies, including
CSSCascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...
,
JavaScriptJavaScript is an object-oriented scripting language used to enable programmatic access to objects within both the client application and other applications. It is primarily used in the form of client-side JavaScript, implemented as an integrated component of the web browser, allowing the...
, and
DOMThe Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...
. Such reliance makes XUL relatively easy to learn for people with a background in web-programming and design.
XUL has no formal specification and does not
inter-operateInteroperability is a property referring to the ability of diverse systems and organizations to work together . The term is often used in a technical systems engineering sense, or alternatively in a broad sense, taking into account social, political, and organizational factors that impact system to...
with non-
GeckoGecko is a layout engine currently developed by Mozilla Corporation, known as the layout engine of the Firefox web browser, Mozilla Application Suite, Nvu, Mozilla Thunderbird and many more...
implementations.
In
computer programmingComputer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language. The code may be a modification of an existing source or something completely new...
,
XUL (pronounced
zool ), the
XML User Interface Language, is an
XMLXML is a set of rules for encoding documents electronically. It is defined in the produced by the W3C and several other related specifications; all are fee-free open standards....
user interface markup languageA user interface markup language is a markup language that renders and describes graphical user interfaces and controls. Many of these markup languages are dialects of XML and are dependent upon a pre-existing scripting language engine, usually a JavaScript engine, for rendering of controls and...
(developed by the
MozillaMozilla is a term used in a number of ways in relation to the now-defunct Netscape Communications Corporation and its related application software, including the Mozilla.org group and its successor the Mozilla Foundation....
project) which operates in Mozilla cross-platform applications such as
FirefoxMozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. Firefox has 23.75% of the recorded usage share of web browsers , making it the second most popular browser in terms of current use worldwide after Microsoft's...
and
FlockFlock is a web browser built on Mozilla’s Firefox codebase that specializes in providing social networking and Web 2.0 facilities built into its user interface...
. The Mozilla
GeckoGecko is a layout engine currently developed by Mozilla Corporation, known as the layout engine of the Firefox web browser, Mozilla Application Suite, Nvu, Mozilla Thunderbird and many more...
layout engine provides an implementation of XUL used in the Firefox Browser.
Design
XUL relies on multiple existing web standards and technologies, including
CSSCascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...
,
JavaScriptJavaScript is an object-oriented scripting language used to enable programmatic access to objects within both the client application and other applications. It is primarily used in the form of client-side JavaScript, implemented as an integrated component of the web browser, allowing the...
, and
DOMThe Document Object Model is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents. Aspects of the DOM may be addressed and manipulated within the syntax of the programming language in use...
. Such reliance makes XUL relatively easy to learn for people with a background in web-programming and design.
XUL has no formal specification and does not
inter-operateInteroperability is a property referring to the ability of diverse systems and organizations to work together . The term is often used in a technical systems engineering sense, or alternatively in a broad sense, taking into account social, political, and organizational factors that impact system to...
with non-
GeckoGecko is a layout engine currently developed by Mozilla Corporation, known as the layout engine of the Firefox web browser, Mozilla Application Suite, Nvu, Mozilla Thunderbird and many more...
implementations. However, it uses an
open sourceOpen source is an approach to the design, development, and distribution of software, offering practical accessibility to a software's source code. Some consider open source as one of various possible design approaches, while others consider it a critical strategic element of their operations...
implementation of Gecko, tri-licensed under the
GPLThe GNU General Public License is a widely used free software license, originally written by Richard Stallman for the GNU project....
,
LGPLThe GNU Lesser General Public License or LGPL is a free software license published by the Free Software Foundation . It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License...
, and
MPLThe Mozilla Public License is a free and open source software license. Version 1.0 was developed by Mitchell Baker when she worked as a lawyer at Netscape Communications Corporation and version 1.1 at the Mozilla Foundation...
.
Mozilla provides experimental
XULRunnerXULRunner is a runtime environment developed by the Mozilla Foundation to provide a common back-end for XUL applications. It replaced the Gecko Runtime Environment, a stalled project with a similar purpose....
builds to let developers build their applications on top of the
Mozilla application frameworkThe Mozilla application framework is a collection of cross-platform software components that make up the Mozilla applications. It was originally known as XPFE, an abbreviation of cross-platform front end. It was also known as XPToolkit...
and XUL in particular.
XUL provides a
portableIn computer science, porting is the process of adapting software so that an executable program can be created for a computing environment that is different from the one for which it was originally designed...
definition for common
widgetsIn computer programming, a widget is an element of a graphical user interface that displays an information arrangement changeable by the user, such as a window or a text box. The defining characteristic of a widget is to provide a single interaction point for the direct manipulation of a given...
, allowing them to move easily to any platform on which Mozilla applications run.
XUL documents
Programmers typically define a XUL interface as 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, such as:
windowIn computing, a window is a visual area containing some kind of user interface. It usually has a rectangular shape. It displays the output of and may allow input to one or more processes....
, page,
dialogIn graphical user interfaces, a dialog box is a special window, used in user interfaces to display information to the user, or to get a response if needed. They are so-called because they form a dialog between the computer and the user—either informing the user of something, or requesting...
,
wizardA wizard is a user interface element where the user is presented with a sequence of dialog boxes. Through these dialog boxes, the user is led through a series of steps, performing tasks in a specific sequence...
, etc.
widgets : e.g., label,
buttonIn computing, a button is a user interface element that provides the user a simple way to trigger an event, like searching for a query at a search engine, or to interact with dialog boxes, like confirming an action.-Description:A typical button is a rectangle or rounded rectangle, wider than it is...
,
text boxA text box, text field or text entry box is a common element of graphical user interface of computer programs, as well as the corresponding type of widget used when programming GUIs. A text box's purpose is to allow the user to input text information to be used by the program...
, list box,
combo boxA combo box is a commonly-used graphical user interface widget. It is a combination of a drop-down list or list box and a single-line textbox, allowing the user to either type a value directly into the control or choose from the list of existing options....
,
radio buttonA radio button or option button is a type of graphical user interface element that allows the user to choose only one of a predefined set of options. They were named after the physical buttons used on older car radios to select preset stations - when one of the buttons was pressed, other buttons...
,
check boxIn computing, a check box is a graphical user interface element that permits the user to make multiple selections from a number of options. Normally, check boxes are shown on the screen as a square box that can contain white space or a tick mark or X , as pictured...
,
treeA tree view or an outline view is a graphical user interface element that presents a hierarchical view of information. Each item can have a number of subitems...
,
menuIn computing and telecommunications, a menu is a list of commands presented to an operator by a computer or communications system. They may be thought of as "shortcuts to frequently used commands that avoid the operator having to have a detailed knowledge or recall of syntax...
,
toolbarIn a graphical user interface on a computer monitor a toolbar is a GUI widget on which onscreen buttons, icons, menus or other input or output elements are placed....
, group box,
tab boxIn graphical user interfaces, a tab is a navigational widget for switching between sets of documents. Having tabs allows an application to have multiple documents in a single window...
, colorpicker, spacer, splitter, etc.
box model: e.g., box, grid, stack, deck, etc.
events and scripts: for instance: script, command, key, broadcaster, observer, etc.
data source: e.g., template, rule, etc.
others: e.g., overlay (analogous to
SSIServer Side Includes is a simple interpreted server-side scripting language used almost exclusively for the web.The most frequent use of SSI is to include the contents of one or more files into a web page on a web server...
, but client-side and more powerful, with higher performance), iframe, browser, editor, etc.
One can use elements from other applications of XML within XUL documents, such as
XHTMLExtensible Hypertext Markup Language, or XHTML, is a family of XML markup languages that mirror or extend versions of the widely used Hypertext Markup Language , the language in which web pages are written....
, SVG, and
MathMLMathematical Markup Language is an application of XML for describing mathematical notations and capturing both its structure and content. It aims at integrating mathematical formulae into World Wide Web documents...
.
Mozilla added some common widgets —
(sometimes called "slider"),
(spinbox), time and date pickers — during the Gecko 1.9 development-cycle.
XUL applications
While XUL serves primarily for constructing Mozilla applications and their extensions, it may also feature in
web-applicationIn software engineering, a web application or webapp is an application that is accessed via a web browser over a network such as the Internet or an intranet...
s transferred over HTTP. The Mozilla Amazon Browser, a former XUL application of this type (and well-known in its day), provided a rich interface for searching books at
Amazon.comAmazon.com, Inc. is an American-based multinational electronic commerce company. Headquartered in Seattle, Washington, it is America's largest online retailer, with nearly three times the Internet sales revenue of the runner up, Staples, Inc....
.
However, many of the powerful features of Mozilla (such as privileged
XPCOMXPCOM is a cross platform component model from Mozilla. It is similar to CORBA and Microsoft COM. It has multiple language bindings and IDL descriptions so programmers can plug their custom functionality into the framework and connect it with other components.-The Model:XPCOM is one of the main...
objects) remain unavailable to unprivileged XUL documents unless the script has a
digital signatureA digital signature or digital signature scheme is a mathematical scheme for demonstrating the authenticity of a digital message or document. A valid digital signature gives a recipient reason to believe that the message was created by a known sender, and that it was not altered in transit...
, and unless the user obtains grants of certain privileges to the application. Such documents also suffer from various limitations of the browser, including the inability to load remote XUL, DTD, and RDF documents.
As
GeckoGecko is a layout engine currently developed by Mozilla Corporation, known as the layout engine of the Firefox web browser, Mozilla Application Suite, Nvu, Mozilla Thunderbird and many more...
provides the only full implementation of XUL, such applications remain inaccessible to users of browsers not based on Mozilla.
The
ActiveState KomodoActiveState Komodo is the name given to a family of integrated development environment applications produced by software firm ActiveState.- Komodo IDE :Komodo IDE is an IDE for dynamic programming languages built on the Mozilla platform...
IDE uses XUL as well as the Open Komodo project announced in 2007.
The
SongbirdSongbird is a free and open source software audio player and web browser founded by Rob Lord and developed by Pioneers of the Inevitable , with a stated mission "to incubate Songbird, the first Web player, to catalyze and champion a diverse, open Media Web."Songbird employs Mozilla's XULRunner...
music-player and Miro video-player both use built-in XUL.
The Cyclone3
CMSA content management system such as a document management system is a computer application used to manage work flow needed to collaboratively create, edit, review, index, search, publish and archive various kinds of digital media and electronic text.CMSs are frequently used for storing,...
uses XUL as an add-on in Mozilla Firefox.
The Elixon WCMS/XUL
Content management systemA content management system such as a document management system is a computer application used to manage work flow needed to collaboratively create, edit, review, index, search, publish and archive various kinds of digital media and electronic text.CMSs are frequently used for storing,...
uses exclusively remote XUL, thus overcoming some of the aforementioned limits of remote unprivileged XUL documents.
The developers of the
CeltxCeltx [ˈkɛltɨks] is free media pre-production software designed for creating and organizing media projects like screenplays, films, videos, stageplays, audio plays, documentaries, machinima, comics, games and podcasts...
media pre-production application used XUL.
Mozilla-programmers sometimes refer to XUL applications running locally as
"chrome"A graphical user interface is a type of user interface item that allows people to interact with programs in more ways than typing such as computers; hand-held devices such as MP3 Players, Portable Media Players or Gaming devices; household appliances and office equipment with images rather than...
.
The name
The "XUL" name references the film
GhostbustersGhostbusters is a 1984 science-fiction comedy film written by co-stars Dan Aykroyd and Harold Ramis about three eccentric New York City parapsychologists-turned-ghost exterminators. The film was released in the United States on June 8, 1984 and like several films of the era, teamed Aykroyd and/or...
(1984), in which the ghost of an ancient
SumerSumer was a civilization and historical region in southern Iraq . It is the earliest known civilization in the world and is known as the Cradle of Civilization...
ian deity called
Zuul possesses the character Dana Barrett (played by
Sigourney WeaverSigourney Weaver is an American actress. She is best known for her roles as Lieutenant Ellen Ripley in the Alien film series and as Dana Barrett in the Ghostbusters movies. Weaver is also a three-time Academy Award nominee for her performances in Aliens, Gorillas in the Mist and Working Girl...
) and declares, "There is no Dana, only Zuul". Since XUL, unusually, uses XML to define an interface rather than a document, its developers adopted the slogan: "There is no data, there is only XUL". Hence the
XML namespaceXML namespaces are used for providing uniquely named elements and attributes in an XML document. They are defined in , a W3C recommendation. An XML instance may contain element or attribute names from more than one XML vocabulary...
URIIn computing, a Uniform Resource Identifier consists of a string of characters used to identify or name a resource on the Internet. Such identification enables interaction with representations of the resource over a network using specific protocols...
at the beginning of every XUL document:
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul
The document pointed-to displays the slogan in large letters in the center of the screen.
"Keymaster" and "gatekeeper" also refer to the plot-line of the
Ghostbusters film . (Other references to
Ghostbusters also occur within Mozilla products: for instance, the JavaScript has a
debuggerA debugger is a computer program that is used to test and debug other programs . The code to be examined might alternatively be running on an instruction set simulator , a technique that allows great power in its ability to halt when specific conditions are encountered but which will typically be...
component called
VenkmanVenkman is the JavaScript debugger component of the Mozilla Application Suite. It is also available as a Mozilla Firefox extension. Venkman is named after the character Dr. Peter Venkman played by Bill Murray in the movies Ghostbusters and Ghostbusters II....
, after
one of the main charactersPeter Venkman, Ph.D. is a fictional character from the Ghostbusters franchise. He is a parapsychologist and member of the Ghostbusters, appearing in the films Ghostbusters and Ghostbusters II and in the animated television series The Real Ghostbusters...
in the film.)
Example
This example shows 3 buttons stacked on top of each other in a vertical box container:
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
Similar languages
HTML ApplicationAn HTML Application is a Microsoft Windows application written with HTML and Dynamic HTML. The ability to write HTAs was introduced with Microsoft Internet Explorer 5.0....
resembles XUL in that it provides a stand-alone capability to run applications based on HTML, DHTML, and Javascript outside of a web browser for the
MicrosoftMicrosoft Corporation is a multinational computer technology corporation that develops, manufactures, licenses, and supports a wide range of software products for computing devices...
Windows environment developed by Microsoft.
The Microsoft
Windows Presentation FoundationThe Windows Presentation Foundation is a graphical subsystem for rendering user interfaces in Windows-based applications. WPF was initially released as part of .NET Framework 3.0...
(WPF), another declarative
UIThe user interface is the aggregate of means by which people—the users—interact with the system—a particular machine, device, computer program or other complex tool...
language (it runs on top of the .NET Framework 2.0 stack as part of the .NET Framework 3.0 extensions), also resembles XUL.
See also
- Layout manager
Layout managers are software components used in widget toolkits which have the ability to lay out widgets by their relative positions without using distance units. It is often more natural to define component layouts in this manner than to define their position in pixels or common distance units,...
- Mozilla application framework
The Mozilla application framework is a collection of cross-platform software components that make up the Mozilla applications. It was originally known as XPFE, an abbreviation of cross-platform front end. It was also known as XPToolkit...
- XBL
XBL is an XML-based markup language used to declare the behavior and look of XUL-widgets and XML elements.XBL was developed by the Mozilla project for use in the Mozilla application suite; the language is not currently described by any formal standard and is thus proprietary to Mozilla, with the...
- XULRunner
XULRunner is a runtime environment developed by the Mozilla Foundation to provide a common back-end for XUL applications. It replaced the Gecko Runtime Environment, a stalled project with a similar purpose....
External links
- XUL documentation on developer.mozilla.org
- XUL Tutorial
- XUL Periodic Table — Visual demonstration of XUL capabilities (requires a Gecko
Gecko is a layout engine currently developed by Mozilla Corporation, known as the layout engine of the Firefox web browser, Mozilla Application Suite, Nvu, Mozilla Thunderbird and many more...
-based (XUL-enabled) browser such as Mozilla FirefoxMozilla Firefox is a free and open source web browser descended from the Mozilla Application Suite and managed by Mozilla Corporation. Firefox has 23.75% of the recorded usage share of web browsers , making it the second most popular browser in terms of current use worldwide after Microsoft's...
)