Jump to content

XUL: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
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 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? }}</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 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>


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|title=Remote Application Development with Mozilla, Part 2: A Case Study of the Mozilla Amazon Browser (MAB)|work=[[Oreillynet]] |date=2003-02-05}}
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. }}
</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 |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>
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>
</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>
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>


== Usage ==
== Usage ==

Revision as of 02:11, 28 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] </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 (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 Hirsch, Jared (2 September 2018). "Life After XUL". Mozilla Developer Network (MDN). 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 Teller, David (Aug 20, 2020). "Why Did Mozilla Remove XUL Add-ons?".
  10. ^ King, Brian (2003-02-05). "Remote Application Development with Mozilla, Part 2: A Case Study of the Mozilla Amazon Browser (MAB)". Oreillynet. Archived from the original on 18 February 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.
  11. ^ Grinstead, Brian (16 December 2019). "Firefox/XUL and XBL Replacement". Retrieved 27 September 2022.
  12. ^ "Adapt to Changes in Thunderbird 69-78". developer.thunderbird.net. 2022. Retrieved 27 September 2022.
  13. ^ Straver, Markus (2 November 2017). "UXP vs goanna". Retrieved 27 September 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.
  14. ^ Tobin, Matt. "There is only XUL". Archived from the original on 17 September 2018. 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