XML User Interface Language

linguaggio per definire interfacce grafiche
Versione del 30 apr 2005 alle 13:06 di Frack (discussione | contributi) (versione iniziale, da finire di tradurre)
(diff) ← Versione meno recente | Versione attuale (diff) | Versione più recente → (diff)

Template:Traduci Inglese XUL (XML User Interface Language) è un linguaggio per definire interfacce grafiche sviluppato per supportare le applicazione basate su Mozilla, come Mozilla Firefox e Mozilla Thunderbird. Come UIML, è una applicazione basata su XML per descrivere interfacce grafiche. Si pronuncia zuul.

Sebbene XUL non sia uno standard pubblico, riusa molte tecnologie standard preesistenti, come i [[CSS], Javascript, DTD e RDF, che lo rende molto semplice da imparare per persone che hanno un conoscenza di sviluppo e design di applicazioni web.

Il maggiore vantaggio di XUL è che fornisce una intefaccia semplice e portabile per i componenti più comuni. Questo riduce lo sforzo implementativo in modo analogo a quello fornito dagli strumenti 4GL.

Introduzione

Una interfaccia XUL è tipicamente definta da tre insiemi discreti di componenti:

Contenuto
il documento XUL, che definisce il layout dell'interfaccia.
Skin
il file CSS e le immagini, che definisco l'aspetto esteriore dell'applicazione
Localizzazione
il documento DTD, che definisce i componenti per una localizzazione più semplice.

Per un esempio, vedete un esempio di Hello world scritto in XUL.

Elementi XUL

Le specifiche XUL coprono un gran numero di elementi, che, in prima appossimazione appartangono alle seguenti aree:

Top-level elements
e.g. window, page, dialog, wizard, etc.
Widgets
e.g. label, button, text box, list box, radio button, check box, tree, menu, toolbar, group box, tab box, color picker, spacer, splitter, etc.
Box model
e.g. box, grid, stack, deck, etc.
Events and Scripts
e.g. script, command, key, broadcaster, observer, etc.
Data source
e.g. template, rule, etc.
Others
e.g. overlay (analagous to SSI, but client side), iframe, browser, editor, etc.

It is possible to use elements from other applications of XML within XUL documents, such as XHTML and MathML.

Some common widgets - such as spinbox, slider, and canvas - are not available in the current XUL specification, but are on the XUL 2.0 to-do list [1].

Usage

While XUL is mostly used for creating the Mozilla application itself and its extensions, it is possible to use it for web applications transferred over HTTP. One of the most well-known XUL applications of this type is the Mozilla Amazon Browser, which provides a rich interface for searching books at Amazon.com. However, many of the powerful features of Mozilla, like privileged XPCOM objects, are not available to remote XUL documents (unless the script is digitally signed), and such documents also suffer from various limitation of the browser, such as the inability to load remote XUL, DTD and RDF documents.

Film references

THERE IS NO DATA.
THERE IS ONLY XUL.

The XUL name is a reference to the film Ghostbusters, in which a ghost called Zuul possesses a character named Dana (played by Sigourney Weaver) and declares "There is no Dana, only Zool". Since XUL is unusual in using XML to define an interface, rather than a document, its developers adopted the slogan "There is no data, only XUL". This is referred to by the XML namespace URI at the beginning of every XUL document, http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul; when viewed with a XUL-capable application, the document pointed to displays the slogan in large letters in the center of the screen (similar to that to the right).

"Keymaster" and "gatekeeper" are also references to the same plotline. This is not the only reference to Ghostbusters within Mozilla - for instance, the JavaScript debugger component is called Venkman, one of the main characters in the film.

See also