Jump to content

XUL: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m https://github.com/mdn/content/issues/12890
Add banner {{Cleanup bare URLs}}. After at least 7 passes by @Citation bot since 20220923, this article still has 1 untagged bare URL ref
Line 1: Line 1:
{{short description|User interface markup language}}
{{short description|User interface markup language}}
{{Cleanup bare URLs|date=September 2022}}
{{infobox programming language
{{infobox programming language
| logo =
| logo =
Line 43: Line 44:
</ref> but those have switched over to [[HTML5]].<ref name="life after xul"/><ref name = "problems with xul"/> The features of HTML5 that made web applications possible, also made much of XUL redundant.<ref name=essay/>
</ref> but those have switched over to [[HTML5]].<ref name="life after xul"/><ref name = "problems with xul"/> The features of HTML5 that made web applications possible, also made much of XUL redundant.<ref name=essay/>


Mozilla released Firefox 57, also known as Firefox Quantum, in 2017. Firefox Quantum switched Gecko to a new multi-process codebase derived from their [[Servo (software)|Servo]] research project. XUL was designed for the original single-process codebase and would have required considerable effort to re-implement. Due to the difficulty of re-creating XUL for their new engine, Mozilla removed support for legacy [[Add-on (Mozilla)|add-ons]], including the use of custom XUL code.<ref name="57rel"/><ref name="2015blog"/> 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.<ref>{{cite web | url=https://wiki.mozilla.org/Firefox/XUL_and_XBL_Replacement | title=Firefox/XUL and XBL Replacement - MozillaWiki }}</ref><ref name="life after xul">{{cite web|last=|first=|date=|title=Life After XUL|url=https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Life_After_XUL:_Building_Firefox_Interfaces_with_HTML|url-status=dead|archive-url=https://web.archive.org/web/20181129013045/https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Life_After_XUL%3A_Building_Firefox_Interfaces_with_HTML|archive-date=29 November 2018|access-date=28 November 2018|website=|publisher=Mozilla}}</ref><ref name = "problems with xul"/>
Mozilla released Firefox 57, also known as Firefox Quantum, in 2017. Firefox Quantum switched Gecko to a new multi-process codebase derived from their [[Servo (software)|Servo]] research project. XUL was designed for the original single-process codebase and would have required considerable effort to re-implement. Due to the difficulty of re-creating XUL for their new engine, Mozilla removed support for legacy [[Add-on (Mozilla)|add-ons]], including the use of custom XUL code.<ref name="57rel"/><ref name="2015blog"/> 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.<ref>{{cite web | url=https://wiki.mozilla.org/Firefox/XUL_and_XBL_Replacement | title=Firefox/XUL and XBL Replacement - MozillaWiki }}</ref><ref name="life after xul">{{cite web|last=|first=|date=|title=Life After XUL|url=https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Life_After_XUL:_Building_Firefox_Interfaces_with_HTML|url-status=dead|archive-url=https://web.archive.org/web/20181129013045/https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Life_After_XUL%3A_Building_Firefox_Interfaces_with_HTML|archive-date=29 November 2018|access-date=28 November 2018|website=|publisher=Mozilla}}</ref><ref name = "problems with xul"/>


When Mozilla removed support from Firefox, there were still several applications using XUL. Mozilla began gradually removing XUL support from their email client, [[Thunderbird (software)|Thunderbird]]. They released Thunderbird 78 without support for XUL-based extensions in 2020.<ref>
When Mozilla removed support from Firefox, there were still several applications using XUL. Mozilla began gradually removing XUL support from their email client, [[Thunderbird (software)|Thunderbird]]. They released Thunderbird 78 without support for XUL-based extensions in 2020.<ref>
https://developer.thunderbird.net/add-ons/updating/tb78/changes
https://developer.thunderbird.net/add-ons/updating/tb78/changes
</ref> 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 [[Pale_Moon#Unified_XUL_Platform_(UXP)|(UXP)]] for their [[Goanna (software)|Goanna]] rendering engine. UXP maintains the traditional XUL capabilities.<ref>{{cite web|url=https://forum.palemoon.org/viewtopic.php?f=62&t=17213|title=UXP vs goanna}}</ref> As a result, Pale Moon and other UXP applications have remained single-process but extensible.<ref>{{cite web |title=There is only XUL |url=http://thereisonlyxul.org/ |access-date=18 September 2018}}</ref>
</ref> 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 [[Pale Moon#Unified XUL Platform (UXP)|(UXP)]] for their [[Goanna (software)|Goanna]] rendering engine. UXP maintains the traditional XUL capabilities.<ref>{{cite web|url=https://forum.palemoon.org/viewtopic.php?f=62&t=17213|title=UXP vs goanna}}</ref> As a result, Pale Moon and other UXP applications have remained single-process but extensible.<ref>{{cite web |title=There is only XUL |url=http://thereisonlyxul.org/ |access-date=18 September 2018}}</ref>


== Usage ==
== Usage ==

Revision as of 16:14, 27 September 2022

XUL
ParadigmDeclarative (markup language)
DeveloperMozilla Foundation
Implementation languageC++
PlatformGecko
OSCross-platform
LicenseMPL
Filename extensions.xul
MIME type: application/vnd.mozilla.xul+xml
Websitedeveloper.mozilla.org/en-US/docs/Mozilla/Tech/XUL
Major implementations
Mozilla
Influenced by
HTML, XML

XUL (/ˈzl/ 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, in recent years, Mozilla has been reducing the usage of XUL in Firefox.[1][2] The most notable example is the removal of add-on customization. Firefox originally permitted add-ons to extensively alter its user interface via custom XUL code, but this capability was removed in 2017 and replaced with the less-permissive WebExtensions API.[3][4] Several forks of Firefox, such as Pale Moon,[5] Basilisk,[6] and Waterfox,[7] retain support for XUL add-ons.

History

The Periodic Table of XUL Elements is a reference extension designed to demonstrate XUL's capabilities.

XUL was devised at Netscape in 1997 as part of the development effort that eventually became the Mozilla codebase.[8] 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.[9]

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,[10] but those have switched over to HTML5.[1][2] The features of HTML5 that made web applications possible, also made much of XUL redundant.[9]

Mozilla released Firefox 57, also known as Firefox Quantum, in 2017. Firefox Quantum switched Gecko to a new multi-process codebase derived from their Servo research project. XUL was designed for the original single-process codebase and would have required considerable effort to re-implement. Due to the difficulty of re-creating XUL for their new engine, Mozilla removed support for legacy add-ons, including the use of custom XUL code.[3][4] 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.[11][1][2]

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.[12] 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.[13] As a result, Pale Moon and other UXP applications have remained single-process but extensible.[14]

Usage

XUL can only be used with the Mozilla codebase (or a fork of it) because the Gecko engine does the XUL rendering.[15]

Application programmers need to 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 defines a wide range of elements, which roughly belong to the following types:

The default behavior of XUL widgets can be altered with XBL bindings.

Example

This example shows three buttons stacked on top of each other in a vertical box container:[16]

<?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>

Ghostbusters reference

The villain of the 1984 film Ghostbusters was a deity called Zuul who possesses the character Dana Barrett and declares, "There is no Dana. There is only Zuul".[17] 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.[18]

References

  1. ^ a b c "Life After XUL". Mozilla. Archived from the original on 29 November 2018. Retrieved 28 November 2018.
  2. ^ a b c "Problems with XUL". mozilla.github.io. Retrieved 2019-06-07.
  3. ^ a b Firefox 57 release notes
  4. ^ a b Kev Needham (2015-08-21). "The Future of Developing Firefox Add-ons". blog.mozilla.org. Retrieved 2018-04-02.
  5. ^ "Pale Moon future roadmap". Pale Moon. Retrieved 2018-04-02.
  6. ^ "Pale Moon team releases first version of Basilisk browser". ghacks.net. 2017-11-17. Retrieved 2018-04-02.
  7. ^ "Waterfox, Its Legacy and Looking to the Future". Waterfox blog. 2018-04-28. Retrieved 2018-06-20.
  8. ^ Jorge O. Castro (2004-06-15). "Ars Technica sits down with Scott Collins from Mozilla.org". Ars Technica. Retrieved 2018-11-28.
  9. ^ a b "Why Did Mozilla Remove XUL Add-ons?".
  10. ^ "Remote Application Development with Mozilla, Part 2: A Case Study of the Mozilla Amazon Browser (MAB)". Oreillynet. 2003-02-05.
  11. ^ "Firefox/XUL and XBL Replacement - MozillaWiki".
  12. ^ https://developer.thunderbird.net/add-ons/updating/tb78/changes
  13. ^ "UXP vs goanna".
  14. ^ "There is only XUL". Retrieved 18 September 2018.
  15. ^ "Gecko FAQ | MDN". developer.mozilla.org. Archived from the original on 2019-10-08. Retrieved 2021-01-05.
  16. ^ "The Box Model - Mozilla | MDN". 2017-12-09. Archived from the original on 2017-12-09. Retrieved 2021-01-05.
  17. ^ Ghostbusters clip
  18. ^ Mozilla XML Namespace