Home      Discussion      Topics      Dictionary      Almanac
Signup       Login
XUL

XUL

Overview
In computer programming
Computer programming
Computer 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 XML
XML
XML 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 language
User interface markup language
A 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 Mozilla
Mozilla
Mozilla 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 Firefox
Mozilla Firefox
Mozilla 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 Flock
Flock (web browser)
Flock 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 Gecko
Gecko (layout engine)
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...

 layout engine provides an implementation of XUL used in the Firefox Browser.

XUL relies on multiple existing web standards and technologies, including CSS
Cascading Style Sheets
Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

, JavaScript
JavaScript
JavaScript 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 DOM
Document Object Model
The 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-operate
Interoperability
Interoperability 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-Gecko
Gecko (layout engine)
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...

 implementations.
Discussion
Ask a question about 'XUL'
Start a new discussion about 'XUL'
Answer questions from other users
Full Discussion Forum
 
Encyclopedia
In computer programming
Computer programming
Computer 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 XML
XML
XML 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 language
User interface markup language
A 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 Mozilla
Mozilla
Mozilla 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 Firefox
Mozilla Firefox
Mozilla 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 Flock
Flock (web browser)
Flock 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 Gecko
Gecko (layout engine)
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...

 layout engine provides an implementation of XUL used in the Firefox Browser.

Design


XUL relies on multiple existing web standards and technologies, including CSS
Cascading Style Sheets
Cascading Style Sheets is a style sheet language used to describe the presentation semantics of a document written in a markup language...

, JavaScript
JavaScript
JavaScript 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 DOM
Document Object Model
The 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-operate
Interoperability
Interoperability 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-Gecko
Gecko (layout engine)
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...

 implementations. However, it uses an open source
Open source
Open 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 GPL
GNU General Public License
The GNU General Public License is a widely used free software license, originally written by Richard Stallman for the GNU project....

, LGPL
GNU Lesser General Public License
The 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 MPL
Mozilla Public License
The 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 XULRunner
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....

 builds to let developers build their applications on top of the Mozilla application framework
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...

 and XUL in particular.

XUL provides a portable
Porting
In 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 widgets
Widget (computing)
In 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:
  1. content: the XUL document(s), whose elements define the layout of the user interface
  2. skin: the CSS and image files, which define the appearance of an application
  3. 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: window
Window (computing)
In 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, dialog
Dialog box
In 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...

, wizard
Wizard (software)
A 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, button
Button (computing)
In 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 box
Text box
A 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 box
Combo box
A 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 button
Radio button
A 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 box
Check box
In 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...

, tree
Tree view
A 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...

, menu
Menu (computing)
In 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...

, toolbar
Toolbar
In 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 box
Tab (GUI)
In 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 SSI
Server Side Includes
Server 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 XHTML
XHTML
Extensible 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 MathML
MathML
Mathematical 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-application
Web application
In 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.com
Amazon.com
Amazon.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 XPCOM
XPCOM
XPCOM 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 signature
Digital signature
A 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 Gecko
Gecko (layout engine)
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...

 provides the only full implementation of XUL, such applications remain inaccessible to users of browsers not based on Mozilla.

The ActiveState Komodo
ActiveState Komodo
ActiveState 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 Songbird
Songbird (software)
Songbird 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 CMS
Content management system
A 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 system
Content management system
A 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 Celtx
Celtx
Celtx [ˈ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"
Graphical user interface
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 Ghostbusters
Ghostbusters
Ghostbusters 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 Sumer
Sumer
Sumer 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 Weaver
Sigourney Weaver
Sigourney 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 namespace
XML Namespace
XML 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...

 URI
Uniform Resource Identifier
In 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 debugger
Debugger
A 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 Venkman
Venkman
Venkman 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 characters
Peter Venkman
Peter 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">