|Paradigm||Declarative (markup language)|
XUL (// ZOOL), which stands for XML User Interface Language, is a user interface markup language developed by Mozilla. XUL is an XML dialect for writing graphical user interfaces, enabling developers to write user interface elements in a manner similar to web pages.
XUL applications rely on the Mozilla codebase or a fork of it. The most prominent example is the Firefox web browser. However, Mozilla has reduced the usage of XUL in Firefox after their rewrite of the browser engine in version 57. This resulted in the removal of add-on customization. Firefox originally permitted add-ons to extensively alter its user interface, but this capability was removed in 2017 and replaced with the less-permissive WebExtensions API. Several forks of Firefox retain support for XUL and XUL-based add-ons. Waterfox maintains a fork of the Mozilla codebase for the Waterfox Classic browser. The Pale Moon browser, Basilisk browser, Hyperbola operating system, and several smaller projects collectively use and maintain the Unified XUL Platform (UXP) implementation.
XUL was devised at Netscape in 1997 as part of the development effort that eventually became the Mozilla codebase. XUL is similar to web technologies implemented by the Gecko rendering engine. When XUL was introduced, it added features beyond the then standard HTML 4. It was designed as an expansion of HTML to be used with applications rather than documents.
XUL was used by various Mozilla projects, forks of Mozilla projects, and projects closely related to Mozilla. Some software projects like Zotero began as Mozilla Firefox extensions and used XULRunner to become standalone desktop applications. In the early 2000s there was some interest in using XUL by other parties, including Amazon, but those have switched over to HTML5. The features of HTML5 that made web applications possible, also made much of XUL redundant.
Mozilla released Firefox 57, also known as Firefox Quantum, in 2017. As part of this, Firefox finished transitioning to a multi-process architecture. Although XUL add-ons worked in this architecture, they created large performance problems. Because of this, Mozilla removed support for legacy add-ons, including the use of custom XUL code. Mozilla switched extensions over to Google's HTML5-based WebExtensions format. In 2017, Firefox still included 289 XUL bindings for native browser components. By the end of 2019, Mozilla had removed all XUL files from their mozilla-central codebase.
When Mozilla removed support from Firefox, there were still several applications using XUL. Mozilla began gradually removing XUL support from their email client, Thunderbird. They released Thunderbird 78 without support for XUL-based extensions in 2020. The SeaMonkey internet suite chose to re-implement XUL for the Firefox Quantum codebase and the suite's development has subsequently slowed. The Pale Moon developers forked Mozilla's entire Firefox 52 ESR codebase to create the Unified XUL Platform (UXP) for their Goanna rendering engine. UXP maintains the traditional XUL capabilities. As a result, Pale Moon and other UXP applications have remained single-process but extensible.
Application programmers need to 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 defines a wide range of elements, which roughly belong to the following types:
- Top-level elements: window, page, dialog, wizard, etc.
- Widgets: 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: box, grid, stack, deck, etc.
- Events and scripts: script, command, key, broadcaster, observer, etc.
- Data source: template, rule, etc.
- Others: overlay, iframe, browser, editor, etc.
The default behavior of XUL widgets can be altered with XBL bindings.
This example shows three buttons stacked on top of each other in a vertical box container:
<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="vbox example" title="Example 3...." xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <layout> <button id="yes1" label="Yes"/> <button id="no1" label="No"/> <button id="maybe1" label="Maybe"/> </layout> </window>
The villain of the 1984 film Ghostbusters was the fictional deity Zuul who possesses the character Dana Barrett and declares: "There is no Dana. There is only Zuul." The creators of XUL, which is pronounced the same as Zuul, made the slogan "There is no data. There is only XUL!", part of which became the XML namespace.
- Hirsch, Jared (September 2, 2018). "Life After XUL". Mozilla Developer Network (MDN). Mozilla. Archived from the original on November 29, 2018. Retrieved November 28, 2018.
- "Problems with XUL". mozilla.github.io. Retrieved June 7, 2019.
- "Firefox 57.0, See All New Features, Updates and Fixes". Mozilla. November 14, 2017. Retrieved September 27, 2022.
- Kev Needham (August 21, 2015). "The Future of Developing Firefox Add-ons". blog.mozilla.org. Retrieved April 2, 2018.
- Kontos, Alex (April 28, 2018). "Waterfox, Its Legacy and Looking to the Future". Waterfox blog. Retrieved June 20, 2018.
- "Pale Moon future roadmap". palemoon.org. Moonchild Productions. March 23, 2022. Retrieved April 2, 2018.
- Brinkmann, Martin (November 17, 2017). "Pale Moon team releases first version of Basilisk browser". Ghacks Technology News. Retrieved April 2, 2018.
- Iceweasel-UXP project page Archived December 29, 2021, at the Wayback Machine
- Jorge O. Castro (June 15, 2004). "Ars Technica sits down with Scott Collins from Mozilla.org". Ars Technica. Retrieved November 28, 2018.
- Teller, David (August 20, 2020). "Why Did Mozilla Remove XUL Add-ons?".
- King, Brian (February 5, 2003). "Remote Application Development with Mozilla, Part 2: A Case Study of the Mozilla Amazon Browser (MAB)". Oreillynet. Archived from the original on February 18, 2012.
The Mozilla Amazon Browser is an interesting case study for a number of reasons. First, it's a working prototype application, not an example constructed solely for the purpose of demonstrating the technology. Second, it exercises many areas of Mozilla's support for remote development and thus shows off the capabilities, potential, and limitations of remote XUL applications. Finally, it demonstrates Mozilla's support for web services, an important emerging technology for web application development.
- Grinstead, Brian (December 16, 2019). "Firefox/XUL and XBL Replacement". Retrieved September 27, 2022.
- "Adapt to Changes in Thunderbird 69-78". developer.thunderbird.net. 2022. Retrieved September 27, 2022.
- Straver, Markus (November 2, 2017). "UXP vs goanna". Retrieved September 27, 2022.
The plan is to switch Pale Moon over from our current platform to UXP (long-term plans) because a developed and maintained XUL-based platform is the only way a XUL application (like Pale Moon) has any chance of surviving without falling into obsolescence, with Mozilla abandoning this technology. That has been the main reason why I decided to start on this platform to begin with! Regardless, the platform will not be solely developed for Pale Moon's potential future use, it is developed for any future XUL application that will otherwise be dead in the water. Basically we're taking over the torch from Mozilla in developing and maintaining a platform for XUL applications of any kind; Mozilla should not be seen as "upstream" because it isn't.
- Tobin, Matt. "There is only XUL". Archived from the original on September 17, 2018. Retrieved September 18, 2018.
- "Gecko FAQ | MDN". developer.mozilla.org. Archived from the original on October 8, 2019. Retrieved January 5, 2021.
- "The Box Model - Mozilla | MDN". December 9, 2017. Archived from the original on December 9, 2017. Retrieved January 5, 2021.
- "Ghostbusters - There Is No Dana, Only ZUUL" – via www.youtube.com.
- "Mozilla XML Namespace". www.mozilla.org.