XUL: Difference between revisions
→See also: User interface markup language page lists lots of them so no need to do so here |
→History: ce |
||
Line 33: | Line 33: | ||
== History == |
== History == |
||
XUL was devised at [[Netscape]] in 1997 as part of the development effort that |
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 |accessdate=2018-11-28}}</ref> While intending to become a general user interface language, XUL never gained much traction outside of Mozilla or its forks (most notably [[SeaMonkey]]). In the early 2000s there was some interest in using XUL by other parties, such as 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}}</ref> but that dried up with the advent of [[HTML5]]. |
||
With the release of Firefox 57 in 2017, Mozilla removed support for legacy [[Add-on (Mozilla)|add-ons]], including the use of custom XUL code |
With the release of Firefox 57 in 2017, Mozilla removed support for legacy [[Add-on (Mozilla)|add-ons]], including the use of custom XUL code.<ref name="57rel"/><ref name="2015blog"/> This was a key step in the organization's long-term goal of reducing XUL usage in Firefox and replacing it with HTML5 alternatives.<ref>{{cite web |title=Life After XUL |url=https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Life_After_XUL%3A_Building_Firefox_Interfaces_with_HTML |publisher=Mozilla |accessdate=28 November 2018}}</ref> |
||
== Usage == |
== Usage == |
Revision as of 22:28, 28 November 2018
Paradigm | Declarative (markup language) |
---|---|
Developer | Mozilla Foundation |
Implementation language | C++ |
Platform | Gecko |
OS | Cross-platform |
License | MPL |
Filename extensions | .xul MIME type: application/vnd.mozilla.xul+xml |
Website | https://developer.mozilla.org/en-US/XUL |
Major implementations | |
Mozilla | |
Influenced by | |
HTML, XML |
XUL (/ˈzuːl/ ZOOL), which stands for XML User Interface Language, is a user interface markup language developed by Mozilla. XUL is implemented as an XML dialect, enabling graphical user interfaces to be written in a similar manner to web pages. Such applications must be created using the Mozilla codebase (or a fork of it); the most prominent example is the Firefox web browser.
In the past, Firefox permitted add-ons to extensively alter its user interface via custom XUL code, but this capability was removed in Firefox 57 and replaced with the less-permissive WebExtensions API.[1][2] (Three forks of Firefox still support the legacy capability: Pale Moon,[3] Basilisk,[4] Waterfox.[5])
History
XUL was devised at Netscape in 1997 as part of the development effort that eventually became the Mozilla codebase.[6] While intending to become a general user interface language, XUL never gained much traction outside of Mozilla or its forks (most notably SeaMonkey). In the early 2000s there was some interest in using XUL by other parties, such as Amazon,[7] but that dried up with the advent of HTML5.
With the release of Firefox 57 in 2017, Mozilla removed support for legacy add-ons, including the use of custom XUL code.[1][2] This was a key step in the organization's long-term goal of reducing XUL usage in Firefox and replacing it with HTML5 alternatives.[8]
Usage
XUL can only be used with the Mozilla codebase (or a fork of it). In particular, the Gecko engine does the XUL rendering.[9]
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.
Programmers can use elements from other applications of XML within XUL documents, such as XHTML, SVG, and MathML.
Example
This example shows three buttons stacked on top of each other in a vertical box container:[10]
<?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">
<vbox>
<button id="yes1" label="Yes"/>
<button id="no1" label="No"/>
<button id="maybe1" label="Maybe"/>
</vbox>
</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".[11] 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.[12]
See also
References
- ^ a b Firefox 57 release notes
- ^ a b Kev Needham (2015-08-21). "The Future of Developing Firefox Add-ons". blog.mozilla.org. Retrieved 2018-04-02.
- ^ "Pale Moon future roadmap". Pale Moon. Retrieved 2018-04-02.
- ^ "Pale Moon team releases first version of Basilisk browser". ghacks.net. 2017-11-17. Retrieved 2018-04-02.
- ^ "Waterfox, Its Legacy and Looking to the Future". Waterfox blog. 2018-04-28. Retrieved 2018-06-20.
- ^ Jorge O. Castro (2004-06-15). "Ars Technica sits down with Scott Collins from Mozilla.org". Ars Technica. Retrieved 2018-11-28.
- ^ "Remote Application Development with Mozilla, Part 2: A Case Study of the Mozilla Amazon Browser (MAB)". Oreillynet. 2003-02-05.
- ^ "Life After XUL". Mozilla. Retrieved 28 November 2018.
- ^ "Gecko FAQ". Mozilla Developer Center. Mozilla Foundation. 2008-03-15. Retrieved 2009-03-26.
- ^ The Box Model - XUL | MDN. Developer.mozilla.org (2012-12-16). Retrieved on 2014-03-28.
- ^ Ghostbusters clip
- ^ Mozilla XML Namespace
External links
- Official XUL documentation from Mozilla