Jump to content

XUL: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Undid revision 1208712033 by 139.47.26.140 (talk) doesn't match illustration on page
m Reverted edit by 2806:250:18:BC25:B17D:D34A:E625:3180 (talk) to last version by 124.122.125.237
 
(10 intermediate revisions by 7 users not shown)
Line 21: Line 21:
| influenced =
| influenced =
| programming language = [[C++]]
| programming language = [[C++]]
| platform = [[Gecko (layout engine)|Gecko]]
| platform = [[Gecko (layout engine)|Gecko]]/[[Goanna_(software)|Goanna]]
| operating system = [[Cross-platform]]
| operating system = [[Cross-platform]]
| license = [[Mozilla Public License|MPL]]
| license = [[Mozilla Public License|MPL]]
Line 31: Line 31:
'''XUL''' ({{IPAc-en|ˈ|z|uː|l}} {{respell|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 interface]]s, enabling developers to write user interface elements in a manner similar to [[web page]]s.
'''XUL''' ({{IPAc-en|ˈ|z|uː|l}} {{respell|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 interface]]s, enabling developers to write user interface elements in a manner similar to [[web page]]s.


XUL [[application software|applications]] rely on the Mozilla [[codebase]] or a [[Fork (software development)|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.<ref name="life after xul"/><ref name = "problems with xul">{{Cite web|url=https://mozilla.github.io/firefox-browser-architecture/text/0003-problems-with-xul.html|title=Problems with XUL|website=mozilla.github.io|access-date=2019-06-07}}</ref> This resulted in the removal of [[Add-on (Mozilla)|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 [[Browser extension#API conformity|WebExtensions API]].<ref name="57rel">{{Cite web|url=https://www.mozilla.org/en-US/firefox/57.0/releasenotes/|title=Firefox 57.0, See All New Features, Updates and Fixes|website=Mozilla |date=14 November 2017 |access-date=27 September 2022}}</ref><ref name="2015blog">{{cite web|title=The Future of Developing Firefox Add-ons|url=https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/|date=2015-08-21|author=Kev Needham|access-date=2018-04-02|website=blog.mozilla.org}}</ref> Several [[Fork (software development)|fork]]s of Firefox retain support for XUL and XUL-based add-ons. [[Waterfox]] maintains a fork of the Mozilla codebase for the Waterfox Classic browser.<ref>{{cite web|title=Waterfox, Its Legacy and Looking to the Future|url=https://blog.waterfoxproject.org/waterfox-its-legacy-and-looking-to-the-future|website=Waterfox blog|date=2018-04-28|access-date=2018-06-20|last=Kontos |first=Alex}}</ref> The [[Pale Moon (web browser)|Pale Moon]] browser,<ref>{{cite web|url=https://www.palemoon.org/roadmap.shtml |title=Pale Moon future roadmap | access-date=2018-04-02 |publisher=Moonchild Productions |date=23 March 2022 |website=palemoon.org}}</ref> [[Basilisk (web browser)|Basilisk]] browser,<ref>{{cite news|title=Pale Moon team releases first version of Basilisk browser|url=https://www.ghacks.net/2017/11/17/pale-moon-team-releases-first-version-of-basilisk-browser/|newspaper=Ghacks Technology News|date=2017-11-17 |last=Brinkmann |first=Martin |access-date=2018-04-02}}</ref> [[Hyperbola GNU/Linux-libre|Hyperbola]] operating system,<ref>[https://wiki.hyperbola.info/doku.php?id=en:project:iceweasel-uxp Iceweasel-UXP project page] {{webarchive|url=https://web.archive.org/web/20211229042029/https://wiki.hyperbola.info/doku.php?id=en:project:iceweasel-uxp|date=December 29, 2021}}</ref> and several smaller projects collectively use and maintain the Unified XUL Platform (UXP) implementation.
XUL [[application software|applications]] rely on the Mozilla [[codebase]] or a [[Fork (software development)|fork]] of it. The most prominent example is the [[Firefox]] web browser. However, Mozilla has significantly reduced the usage of XUL in Firefox after their rewrite of the browser engine in version 57.<ref name="life after xul"/><ref name = "problems with xul">{{Cite web|url=https://mozilla.github.io/firefox-browser-architecture/text/0003-problems-with-xul.html|title=Problems with XUL|website=mozilla.github.io|access-date=2019-06-07}}</ref> This resulted in the removal of the legacy [[Add-on (Mozilla)|add-on]] system, which relied on XUL and [[XPCOM]], another cross-platform technology Mozilla decided to deprecate shortly before the release of Firefox 57. Firefox originally permitted add-ons to extensively alter its user interface, but this capability was removed in 2017 and replaced with the less-permissive [[Browser extension#API conformity|WebExtensions API]].<ref name="57rel">{{Cite web|url=https://www.mozilla.org/en-US/firefox/57.0/releasenotes/|title=Firefox 57.0, See All New Features, Updates and Fixes|website=Mozilla |date=14 November 2017 |access-date=27 September 2022}}</ref><ref name="2015blog">{{cite web|title=The Future of Developing Firefox Add-ons|url=https://blog.mozilla.org/addons/2015/08/21/the-future-of-developing-firefox-add-ons/|date=2015-08-21|author=Kev Needham|access-date=2018-04-02|website=blog.mozilla.org}}</ref> Several [[Fork (software development)|fork]]s of Firefox retain support for XUL and XPCOM-based add-ons. [[Waterfox]] maintains a fork of the legacy Mozilla codebase for the ''Waterfox Classic'' browser.<ref>{{cite web|title=Waterfox, Its Legacy and Looking to the Future|url=https://blog.waterfoxproject.org/waterfox-its-legacy-and-looking-to-the-future|website=Waterfox blog|date=2018-04-28|access-date=2018-06-20|last=Kontos |first=Alex}}</ref> The [[Pale Moon (web browser)|Pale Moon]] browser,<ref>{{cite web|url=https://www.palemoon.org/roadmap.shtml |title=Pale Moon future roadmap | access-date=2018-04-02 |publisher=Moonchild Productions |date=23 March 2022 |website=palemoon.org}}</ref> [[Basilisk (web browser)|Basilisk]] browser,<ref>{{cite news|title=Pale Moon team releases first version of Basilisk browser|url=https://www.ghacks.net/2017/11/17/pale-moon-team-releases-first-version-of-basilisk-browser/|newspaper=Ghacks Technology News|date=2017-11-17 |last=Brinkmann |first=Martin |access-date=2018-04-02}}</ref> [[Hyperbola GNU/Linux-libre|Hyperbola]] operating system,<ref>[https://wiki.hyperbola.info/doku.php?id=en:project:iceweasel-uxp Iceweasel-UXP project page] {{webarchive|url=https://web.archive.org/web/20211229042029/https://wiki.hyperbola.info/doku.php?id=en:project:iceweasel-uxp|date=December 29, 2021}}</ref> and numerous smaller projects collectively use and maintain the Unified XUL Platform (UXP) implementation.


== History ==
== History ==
Line 39: Line 39:
XUL was devised at [[Netscape]] in 1997 as part of the development effort that eventually became the [[Mozilla]] [[codebase]].<ref>
XUL was devised at [[Netscape]] in 1997 as part of the development effort that eventually became the [[Mozilla]] [[codebase]].<ref>
{{cite web |url = https://arstechnica.com/information-technology/2004/06/collins-interview/2/ |title = Ars Technica sits down with Scott Collins from Mozilla.org |author = Jorge O. Castro |publisher = Ars Technica |date = 2004-06-15 |access-date=2018-11-28}}
{{cite web |url = https://arstechnica.com/information-technology/2004/06/collins-interview/2/ |title = Ars Technica sits down with Scott Collins from Mozilla.org |author = Jorge O. Castro |publisher = Ars Technica |date = 2004-06-15 |access-date=2018-11-28}}
</ref> XUL is similar to web technologies implemented by the [[Gecko (software)|Gecko]] rendering engine. When XUL was introduced, it added features beyond the then standard [[HTML|HTML 4]]. It was designed as an expansion of HTML to be used with applications rather than documents.<ref name=essay>{{cite web | url=https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/ | title=Why Did Mozilla Remove XUL Add-ons? |last=Teller |first=David |date=Aug 20, 2020}}</ref>
</ref> XUL is similar to web technologies implemented by the [[Gecko (software)|Gecko]] rendering engine. When XUL was introduced, it added features beyond the then standard [[HTML|HTML 4]]. It was designed as an extension of HTML to be used with applications rather than documents.<ref name=essay>{{cite web | url=https://yoric.github.io/post/why-did-mozilla-remove-xul-addons/ | title=Why Did Mozilla Remove XUL Add-ons? |last=Teller |first=David |date=Aug 20, 2020}}</ref>


XUL was used by various Mozilla projects, [[Fork (software development)|forks]] of Mozilla projects, and projects closely related to Mozilla. Some software projects like [[Zotero]] began as Mozilla Firefox [[browser extension|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 (company)|Amazon]],<ref>{{cite web|url=http://www.oreillynet.com/pub/a/mozilla/2003/05/02/casestudy2.html |archive-url=https://web.archive.org/web/20120218221243/http://www.oreillynet.com/pub/a/mozilla/2003/05/02/casestudy2.html |archive-date=18 February 2012 |last=King |first=Brian |title=Remote Application Development with Mozilla, Part 2: A Case Study of the Mozilla Amazon Browser (MAB)|work=[[Oreillynet]] |date=2003-02-05 |quote=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. }}
XUL was used by various Mozilla projects, [[Fork (software development)|forks]] of Mozilla projects, and projects closely related to Mozilla. Some software projects such as [[Songbird (software)|Songbird]], [[Komodo IDE]], and [[Zotero]] started as desktop applications that utilized [[XULRunner]] to render and compose their UI. In the early 2000s, there was some interest in using XUL by other parties, including [[Amazon (company)|Amazon]],<ref>{{cite web|url=http://www.oreillynet.com/pub/a/mozilla/2003/05/02/casestudy2.html |archive-url=https://web.archive.org/web/20120218221243/http://www.oreillynet.com/pub/a/mozilla/2003/05/02/casestudy2.html |archive-date=18 February 2012 |last=King |first=Brian |title=Remote Application Development with Mozilla, Part 2: A Case Study of the Mozilla Amazon Browser (MAB)|work=[[Oreillynet]] |date=2003-02-05 |quote=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. }}
</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" /> Many of the features of modern web technologies such as HTML5, CSS3, ECMAScript 5+, WebGL, and WebAssembly that made rich and modern web applications possible, without the need of utilizing legacy [[NPAPI]]/[[PPAPI]]/[[ActiveX]] browser plug-in technologies like [[Adobe Flash Player|Adobe Flash]], [[Microsoft Silverlight|Silverlight]], [[Java Web Start|Java]], or [[Adobe Shockwave Player|Shockwave]], also made much of XUL redundant.<ref name=essay/>


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-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 |access-date=27 September 2022 |last=Grinstead |first=Brian |date=16 December 2019}}</ref><ref name="life after xul">{{cite web|last=Hirsch|first=Jared|date=2 September 2018|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=Mozilla Developer Network (MDN) |publisher=Mozilla}}</ref><ref name = "problems with xul"/>
Mozilla released Firefox 57, also known as Firefox Quantum, in November 2017. As part of this, Firefox finished transitioning to a multiprocess architecture. Although XUL add-ons could work in this architecture, they often created significant performance issues. Because of this, 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 their browser extensions system to the cross-browser WebExtensions API, which is largely based off the Chrome extension API. In late 2017, Firefox still included 289 XUL bindings for native browser components. By the end of 2019, Mozilla had removed all XUL files from their <code>mozilla-central</code> repository.<ref>{{cite web | url=https://wiki.mozilla.org/Firefox/XUL_and_XBL_Replacement | title=Firefox/XUL and XBL Replacement |access-date=27 September 2022 |last=Grinstead |first=Brian |date=16 December 2019}}</ref><ref name="life after xul">{{cite web|last=Hirsch|first=Jared|date=2 September 2018|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=Mozilla Developer Network (MDN) |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>{{cite web|url=https://developer.thunderbird.net/add-ons/updating/tb78/changes |title=Adapt to Changes in Thunderbird 69-78 |website=developer.thunderbird.net |access-date=27 September 2022 |date=2022}}</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>{{cite web|url=https://developer.thunderbird.net/add-ons/updating/tb78/changes |title=Adapt to Changes in Thunderbird 69-78 |website=developer.thunderbird.net |access-date=27 September 2022 |date=2022}}</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 |last=Straver |first=Markus |access-date=27 September 2022 |date=2 November 2017 |quote=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.}}</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/ |archive-url=https://web.archive.org/web/20180917071644/http://thereisonlyxul.org/ |archive-date=17 September 2018 |last=Tobin |first=Matt |access-date=18 September 2018}}</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 |last=Straver |first=Markus |access-date=27 September 2022 |date=2 November 2017 |quote=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.}}</ref> As a result, Pale Moon and other UXP applications have remained single-process but more extensible compared to modern versions of Firefox and Thunderbird.<ref>{{cite web |title=There is only XUL |url=http://thereisonlyxul.org/ |archive-url=https://web.archive.org/web/20180917071644/http://thereisonlyxul.org/ |archive-date=17 September 2018 |last=Tobin |first=Matt |access-date=18 September 2018}}</ref>


== Usage ==
== Usage ==
XUL can only be used with the [[Mozilla]] [[codebase]] (or a [[Fork (software development)|fork]] of it) because the [[Gecko (layout engine)|Gecko]] [[browser engine|engine]] does the XUL rendering.<ref>{{Cite web|title=Gecko FAQ {{!}} MDN|url=https://developer.mozilla.org/en-US/docs/Gecko/FAQ|access-date=2021-01-05|website=developer.mozilla.org|archive-date=2019-10-08|archive-url=https://web.archive.org/web/20191008071852/https://developer.mozilla.org/en-US/docs/Gecko/FAQ|url-status=dead}}</ref>
XUL can only be used with the [[Mozilla]] [[codebase]] (or a [[Fork (software development)|fork]] of it) because the [[Gecko (layout engine)|Gecko]] (or [[Goanna (software)|Goanna]]) [[browser engine|engine]] does the XUL rendering.<ref>{{Cite web|title=Gecko FAQ {{!}} MDN|url=https://developer.mozilla.org/en-US/docs/Gecko/FAQ|access-date=2021-01-05|website=developer.mozilla.org|archive-date=2019-10-08|archive-url=https://web.archive.org/web/20191008071852/https://developer.mozilla.org/en-US/docs/Gecko/FAQ|url-status=dead}}</ref>


Application programmers need to define a XUL interface as three discrete sets of components:
Application programmers need to define a XUL interface as three discrete sets of components:
Line 66: Line 66:


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

===XBL===
{{main|XBL}}
XML Binding Language ([[XBL]]) is an [[XML]]-based [[markup language]] for altering the behavior of a [[XUL]] [[Graphical widget|widget]], such as a [[scroll bar]].<ref>{{cite web|author=Castro|first=Jorge O.|date=2004-06-15|title=Ars Technica sits down with Scott Collins from Mozilla.org|url=https://arstechnica.com/information-technology/2004/06/collins-interview/2/|url-status=live|archive-url=https://web.archive.org/web/20180222104837/https://arstechnica.com/information-technology/2004/06/collins-interview/2/|archive-date=2018-02-22|access-date=2018-11-28|website=[[Ars Technica]]|page=2}}</ref><ref>{{cite web|title=XBL 2.0 Acknowledgments|url=http://www.w3.org/TR/xbl/#acknowledgments|website=www.w3.org}}</ref> An XBL file contains [[data binding|bindings]], each of which describes the behavior of a XUL widget. The root element of an XBL file is the <code><nowiki><bindings></nowiki></code> element, which contains one or more <code><nowiki><binding></nowiki></code> elements. Each <code><nowiki><binding></nowiki></code> element declares one binding, which can be attached to any XUL element. It may also possess an <code><nowiki>id</nowiki></code> attribute. A binding is assigned to an element by setting the CSS property <code><nowiki>-moz-binding</nowiki></code> to the [[Uniform Resource Locator|URL]] of the binding's file.<ref>{{cite web|title=XBL 2.0|url=http://www.w3.org/TR/xbl/|website=www.w3.org}}</ref> For example:
<syntaxhighlight lang="css">
scrollbar {
-moz-binding: url('somefile.xml#binding1');
}
</syntaxhighlight>



=== Example ===
=== Example ===
Line 87: Line 97:


==''Ghostbusters'' reference ==
==''Ghostbusters'' reference ==
The villain of the 1984 film ''[[Ghostbusters]]'' was the fictional deity Zuul who [[Spirit possession|possesses]] the character Dana Barrett and declares: "There is no Dana. There is only Zuul."<ref>{{Cite web|url=https://www.youtube.com/watch?v=lg7MAacSPNM|title=Ghostbusters - There Is No Dana, Only ZUUL|via=www.youtube.com}}</ref> 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]].<ref>{{Cite web|url=https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul|title=Mozilla XML Namespace|website=www.mozilla.org}}</ref>
XUL contains a reference to the 1984 film ''[[Ghostbusters]]''.<ref name="Frederick-2010"/> The film's antagonist is the fictional deity Zuul, the Gatekeeper.<ref name="Garcia-Ventura-2020">{{cite book |last1=Garcia-Ventura |first1=Agnes |last2=Verderame |first2=Lorenzo |title=Receptions of the Ancient Near East in Popular Culture and Beyond |date=1 March 2020 |publisher=Lockwood Press |isbn=978-1-948488-25-9 |pages=109 |url=https://books.google.com/books?id=-E7VDwAAQBAJ&dq=%22XUL%22+%22zuul%22&pg=PA109 |language=en}}</ref> Zuul [[Spirit possession|possesses]] the character Dana Barrett and declares: "There is no Dana. There is only Zuul."<ref name="Quinlan-2014">{{cite web |last1=Quinlan |first1=Erin |title='Ghostbusters' turns 30: Revisit film's supernatural wisdom |url=https://www.today.com/popculture/ghostbusters-turns-30-revisit-films-supernatural-wisdom-2d79768136 |website=Today |access-date=25 May 2024 |language=en |date=6 June 2014}}</ref><ref name="Frederick-2010"/> The creators of XUL, pronounced the same as Zuul,<ref name="Holzner-2001">{{cite book |last1=Holzner |first1=Steven |title=Inside XML |date=2001 |publisher=New Riders |isbn=978-0-7357-1020-7 |page=47 |url=https://books.google.com/books?id=olpC8FqAQpEC&dq=%22XUL%22+%22zuul%22&pg=PA47 |language=en}}</ref> made the slogan, "There is no data. There is only XUL!".<ref>{{Cite web|url=https://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul|title=Mozilla XML Namespace|website=www.mozilla.org}}</ref> The slogan and Zuul as a gatekeeper are referenced in XUL's [[XML Namespace|XML namespace]] [[Uniform Resource Identifier|URI]] and were previously present in all Firefox add-ons:<ref name="Frederick-2010">{{cite book |last1=Frederick |first1=Gail |last2=Lal |first2=Rajesh |title=Beginning Smartphone Web Development: Building JavaScript, CSS, HTML and Ajax-based Applications for iPhone, Android, Palm Pre, BlackBerry, Windows Mobile and Nokia S60 |date=15 April 2010 |publisher=Apress |isbn=978-1-4302-2621-5 |page=23 |url=https://books.google.com/books?id=rLqJNQ3_hpsC&dq=%22There+is+no+data.+There+is+only+XUL!%22&pg=PA23 |language=en}}</ref>

{{blockquote
|text=<code><nowiki>http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul</nowiki></code>
|author=Mozilla<ref name="Frederick-2010"/>
}}

== See Also ==
* [[Glade Interface Designer]]


== References ==
== References ==

Latest revision as of 16:26, 26 December 2024

XUL
ParadigmDeclarative (markup language)
DeveloperMozilla Foundation
Implementation languageC++
PlatformGecko/Goanna
OSCross-platform
LicenseMPL
Filename extensions.xul
MIME type: application/vnd.mozilla.xul+xml
Websitehttps://wiki.mozilla.org/XUL:Home_Page
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, Mozilla has significantly reduced the usage of XUL in Firefox after their rewrite of the browser engine in version 57.[1][2] This resulted in the removal of the legacy add-on system, which relied on XUL and XPCOM, another cross-platform technology Mozilla decided to deprecate shortly before the release of Firefox 57. 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.[3][4] Several forks of Firefox retain support for XUL and XPCOM-based add-ons. Waterfox maintains a fork of the legacy Mozilla codebase for the Waterfox Classic browser.[5] The Pale Moon browser,[6] Basilisk browser,[7] Hyperbola operating system,[8] and numerous smaller projects collectively use and maintain the Unified XUL Platform (UXP) implementation.

History

[edit]
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.[9] 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 extension of HTML to be used with applications rather than documents.[10]

XUL was used by various Mozilla projects, forks of Mozilla projects, and projects closely related to Mozilla. Some software projects such as Songbird, Komodo IDE, and Zotero started as desktop applications that utilized XULRunner to render and compose their UI. In the early 2000s, there was some interest in using XUL by other parties, including Amazon,[11] but those have switched over to HTML5.[1][2] Many of the features of modern web technologies such as HTML5, CSS3, ECMAScript 5+, WebGL, and WebAssembly that made rich and modern web applications possible, without the need of utilizing legacy NPAPI/PPAPI/ActiveX browser plug-in technologies like Adobe Flash, Silverlight, Java, or Shockwave, also made much of XUL redundant.[10]

Mozilla released Firefox 57, also known as Firefox Quantum, in November 2017. As part of this, Firefox finished transitioning to a multiprocess architecture. Although XUL add-ons could work in this architecture, they often created significant performance issues. Because of this, Mozilla removed support for legacy add-ons, including the use of custom XUL code.[3][4] Mozilla switched their browser extensions system to the cross-browser WebExtensions API, which is largely based off the Chrome extension API. In late 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 repository.[12][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.[13] 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.[14] As a result, Pale Moon and other UXP applications have remained single-process but more extensible compared to modern versions of Firefox and Thunderbird.[15]

Usage

[edit]

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

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.

XBL

[edit]

XML Binding Language (XBL) is an XML-based markup language for altering the behavior of a XUL widget, such as a scroll bar.[17][18] An XBL file contains bindings, each of which describes the behavior of a XUL widget. The root element of an XBL file is the <bindings> element, which contains one or more <binding> elements. Each <binding> element declares one binding, which can be attached to any XUL element. It may also possess an id attribute. A binding is assigned to an element by setting the CSS property -moz-binding to the URL of the binding's file.[19] For example:

scrollbar {
  -moz-binding: url('somefile.xml#binding1');
}


Example

[edit]

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

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

[edit]

XUL contains a reference to the 1984 film Ghostbusters.[21] The film's antagonist is the fictional deity Zuul, the Gatekeeper.[22] Zuul possesses the character Dana Barrett and declares: "There is no Dana. There is only Zuul."[23][21] The creators of XUL, pronounced the same as Zuul,[24] made the slogan, "There is no data. There is only XUL!".[25] The slogan and Zuul as a gatekeeper are referenced in XUL's XML namespace URI and were previously present in all Firefox add-ons:[21]

http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul

— Mozilla[21]

See Also

[edit]

References

[edit]
  1. ^ a b c 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.
  2. ^ a b c "Problems with XUL". mozilla.github.io. Retrieved June 7, 2019.
  3. ^ a b "Firefox 57.0, See All New Features, Updates and Fixes". Mozilla. November 14, 2017. Retrieved September 27, 2022.
  4. ^ a b Kev Needham (August 21, 2015). "The Future of Developing Firefox Add-ons". blog.mozilla.org. Retrieved April 2, 2018.
  5. ^ Kontos, Alex (April 28, 2018). "Waterfox, Its Legacy and Looking to the Future". Waterfox blog. Retrieved June 20, 2018.
  6. ^ "Pale Moon future roadmap". palemoon.org. Moonchild Productions. March 23, 2022. Retrieved April 2, 2018.
  7. ^ Brinkmann, Martin (November 17, 2017). "Pale Moon team releases first version of Basilisk browser". Ghacks Technology News. Retrieved April 2, 2018.
  8. ^ Iceweasel-UXP project page Archived December 29, 2021, at the Wayback Machine
  9. ^ Jorge O. Castro (June 15, 2004). "Ars Technica sits down with Scott Collins from Mozilla.org". Ars Technica. Retrieved November 28, 2018.
  10. ^ a b Teller, David (August 20, 2020). "Why Did Mozilla Remove XUL Add-ons?".
  11. ^ 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.
  12. ^ Grinstead, Brian (December 16, 2019). "Firefox/XUL and XBL Replacement". Retrieved September 27, 2022.
  13. ^ "Adapt to Changes in Thunderbird 69-78". developer.thunderbird.net. 2022. Retrieved September 27, 2022.
  14. ^ 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.
  15. ^ Tobin, Matt. "There is only XUL". Archived from the original on September 17, 2018. Retrieved September 18, 2018.
  16. ^ "Gecko FAQ | MDN". developer.mozilla.org. Archived from the original on October 8, 2019. Retrieved January 5, 2021.
  17. ^ Castro, Jorge O. (June 15, 2004). "Ars Technica sits down with Scott Collins from Mozilla.org". Ars Technica. p. 2. Archived from the original on February 22, 2018. Retrieved November 28, 2018.
  18. ^ "XBL 2.0 Acknowledgments". www.w3.org.
  19. ^ "XBL 2.0". www.w3.org.
  20. ^ "The Box Model - Mozilla | MDN". December 9, 2017. Archived from the original on December 9, 2017. Retrieved January 5, 2021.
  21. ^ a b c d Frederick, Gail; Lal, Rajesh (April 15, 2010). Beginning Smartphone Web Development: Building JavaScript, CSS, HTML and Ajax-based Applications for iPhone, Android, Palm Pre, BlackBerry, Windows Mobile and Nokia S60. Apress. p. 23. ISBN 978-1-4302-2621-5.
  22. ^ Garcia-Ventura, Agnes; Verderame, Lorenzo (March 1, 2020). Receptions of the Ancient Near East in Popular Culture and Beyond. Lockwood Press. p. 109. ISBN 978-1-948488-25-9.
  23. ^ Quinlan, Erin (June 6, 2014). "'Ghostbusters' turns 30: Revisit film's supernatural wisdom". Today. Retrieved May 25, 2024.
  24. ^ Holzner, Steven (2001). Inside XML. New Riders. p. 47. ISBN 978-0-7357-1020-7.
  25. ^ "Mozilla XML Namespace". www.mozilla.org.