XML User Interface Language
XML User Interface Language ( XUL ) is an XML -based description language for graphical user interfaces (GUIs). It was originally developed for the Mozilla project, but is now also used by other software. In Mozilla applications such as Firefox , Thunderbird , SeaMonkey or Netscape , the entire user interface is generated from XUL files. The Gecko rendering engine is used, which is also used to display websites .
XUL allows the separation of layout , design and code a user interface. The layout and thus the rough structure of the user interface (such as buttons , input fields and other control elements ) is defined in XUL, while the presentation (specific fonts, colors, line styles, etc.) is defined with CSS . Different themes (so-called skins ), also to simulate the appearance of different operating systems, can then be created relatively easily by changing the CSS styles.
Because XUL files are not compiled, but rather interpreted at runtime, it is also possible for users to edit and expand the user interface according to their own wishes, which in Mozilla programs can in principle also be done automatically using installable add-ons . This was possible, for example, in the Firefox browser up to version 56, since then only extensions have worked that use the more modern, but more restrictive WebExtensions format.
The creation of new interfaces in XUL is easier and less time-consuming than with many programming languages. At a port to a particular operating system - platform ported must the entire Mozilla XUL toolkit on the new platform. In return, after such porting, XUL-based programs no longer require any special adjustments, which greatly simplifies the development of applications that are independent of the operating system.
The disadvantage is that the processing and display speed is often slower than with native user interfaces due to the additional effort involved in processing the XUL files and the necessary calculations of the layout and appearance. Since the operating system-specific controls have to be simulated using CSS, there may be differences in the appearance and behavior of the user interface compared to native programs.
Structure of an XUL file
A simple XUL file could look like this:
<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="sample-window" title="Beispiel" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox> <checkbox label="CheckBox"/> <hbox> <spacer flex="1"/> <button label="OK"/> <button label="Abbrechen"/> </hbox> </vbox> </window>
- Bluegriffon - successor to Kompozer
- the software on the Oxford Advanced Learner's Dictionary Companion CD
- the visual programming environment Orchestra (Symphony OS)
- Flock (browser)
- Google AdWords editor
- Instantbird - instant messenger based on XUL and libpurple
- KompoZer - HTML editor (successor to Nvu)
- Mozilla Application Suite
- Mozilla Firefox
- Mozilla Sunbird
- Mozilla Thunderbird
- Pencil Project - graphical GUI drafting program.
- Postbox - Mail client based on Mozilla Thunderbird
- Premiere Desktop TV Guide ( electronic program guide )
- TomTom Home
- Twibs - content management system based on Java and XUL
- XUL Explorer - IDE for creating XUL applications
- XULPlayer - media player based on XUL and MPlayer
- Vodafone Widget Packager - widget development tool
References on Ghostbusters
The acronym XUL has its origins in the movie Ghostbusters , in which the demigod spirit, who has taken possession of Dana Barrett, claims that there is no Dana, there is only Zuul. The developers of XUL adopted this sentence slightly modified as There is no data, there is only XUL. and thus pointed to the unusual property of XUL as an XML language of not containing data or documents, but describing a user interface.
Further references to the film Ghostbusters can be on the XML - namespace - URI
http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul read, which is located at the beginning of each XUL file. Keymasters and gatekeepers also refer to characters from the film here. If you call up the address in the web browser, the previously mentioned sentence There is no data, there is only XUL appears.
Techniques with a similar concept
There are now other XML-based formats that describe a user interface, which means that the named XUL property is no longer so unusual today (see previous chapter):
- With FXML, JavaFX has an XML language for describing the GUI.
- Microsoft is following a similar concept with its XAML description language . XAML is a fundamental concept in the Windows Presentation Foundation and Silverlight and can also be used with the Windows Runtime .
- NeXT's implementation of the MVC model saved the description of the GUI in NIB files, from which the application initialized the interface at runtime. However, both the graphical properties and the logic of the GUI were described in it. The concept was continued in Apple's macOS and has been using XML files since XCode 3.0 .
- ZUL from the ZK OSS
- Kenneth C. Feldt: Programming Firefox . O'Reilly, 2007, ISBN 0-596-10243-7
- Jonathan Protzenko: XUL. Open Source Press, 2006, ISBN 3-937514-23-6
- Nigel McFarlane: Rapid Application Development with Mozilla . 1st edition. Prentice Hall PTR, 2003, ISBN 978-0-13-142343-5
- David Boswell, Brian King, Ian Oeschger, Pete Collins, Eric Murphy: Creating Applications with Mozilla . 1st edition. O'Reilly, 2002, ISBN 0-596-00052-9
- Vaughn Bullard, Kevin T. Smith, Michael C. Daconta: Essential XUL Programming. 1st edition. Wiley, 2001, ISBN 978-0-471-41580-0
- Sebastian Kortemeyer, Frank Thiesing: Good description: Design web application with XUL and SVG. In: c't , 5/2008, p. 202
- Karsten Düsterloh: XUL Tutorial I: Basic elements of the browser extension . ( Memento of June 18, 2005 in the Internet Archive ) In: iX , 7/2005, p. 124
- Karsten Düsterloh: XUL Tutorial II: Trees and Templates . ( Memento of July 15, 2005 in the Internet Archive ) In: iX , 8/2005, p. 148
- Karsten Düsterloh: XUL tutorial III: Mail extension Mistory . ( Memento of February 4, 2006 in the Internet Archive ) In: iX , 9/2005, p. 154
- Karsten Violka, Andreas Otte: The monster from XUL. In: c't , 20/2002, p. 232
Mozilla Developer Center
- Overlay extensions. Retrieved August 30, 2019 .
- Getting Started with JavaFX: Using FXML to Create a User Interface | JavaFX 2 Tutorials and Documentation. Retrieved January 26, 2018 .