Les joies de XUL

  • Raccourci de la révision : Les_joies_de_XUL
  • Titre de la révision : Les joies de XUL
  • ID de la révision : 122448
  • Créé :
  • Créateur : Duarna
  • Version actuelle ? Non
  • Commentaire /* Fonctionnalités clé et avantages */ presque finie la traduction reste une phrase que je comprends pas vraiment ...

Contenu de la révision

{{template.Traduction_en_cours("The Joy of XUL")}} Public visé : Les développeurs d'application et les chefs développeurs qui cherchent à mieux comprendre XUL et pourquoi la plateforme Mozilla est basée dessus.

Introduction

XUL (prononcé "zoul") est le langage d'interface utilisateur de Mozilla basé sur XML permettant de développer des applications multiplateformes riches en fonctionnalités et pouvant tourner connectée ou non à Internet. Ces applications sont facilement modifiables avec des textes, graphismes, et mises en page alternatifs, de telle manière qu'elles peuvent être facilement marquées ou localisées pour différents marchés. Les développeurs Web déjà familiers avec l'HTML Dynamique (DHTML) pourront développer tout des suite des applications .

Ce document décrira les irrésistibles raisons pour les développeurs d'application de choisir XUL et la technologie Mozilla pour développer des applications multiplateformes. Cette même enquête donnera des explications suffisantes des motivations de Mozilla dans le développement XUL et pourquoi la plateforme de Mozilla est basée dessus. Les fonctionnalités clé et les avantages de XUL seront explorés suivis d'un tour d'horizon des technologies soutenues par Mozilla. Enfin, une petite étude de cas d'un logiciel calendrier écrit avec XUL montrera les avantages de développer une application avec Mozilla.

Fonctionnalités clé et avantages

Langage de balisage puissant basé sur les widgets Le but de XUL est de construire des applications multiplateformes, en contraste avec le DHTML qui est conçu pour développer des pages Web. C'est pour ces raisons que XUL est orienté vers des artéfacts présents dans les applications comme les fenêtres, les labels et les boutons, au lieu d'être orienté vers les pages, niveaux de titre, et liens hypertextes.

En fait, beaucoup de développeurs investissent des efforts considérables pour obtenir un résultat comparable dans leurs applications Web DHTML au prix de la complexité, des performances, et du respect des standards.

Basé sur des standards existants XUL est un langage basé sur le standard XML 1.0 du W3C. Les applications écrites en XUL aussi sont basées sur d'autres standards du W3C tels que HTML 4.0; les Feuilles de Style en Cascade (CSS) 1 et 2; le modèle de document objet (DOM) niveaux 1 et 2; Javascript 1.5, incluant ECMA-262 Edition 3 (ECMAscript); XML 1.0.

mozilla.org va plus loin en cherchant à obtenir une standardisation du W3C pour l'eXtensible Binding Language (XBL) (voir "Technologies supportées", ci-dessous).

Portabilité de la plateforme

A l'instar de l'HTML, XUL est conçu pour être indépendant de la plateforme, rendant les applications facilement portables à tous les systèmes d'exploitation sur lesquels Mozilla tourne. Si l'on considère le large éventail de plateformes qui actuellement supportent Mozilla, cela peut être une des caractéristiques intéressantes de XUL en tant que technologie pour développer des applications.

Puisque XUL donne une abstraction des composants de l'interface utilisateur, il tient la promesse d'écrire une fois, exécuter partout (NdT : write-once, run anywhere pour les anglophones). L'interface de toutes les applications phares de Mozialla (Browser, Messenger, Address Book, etc.) est écrite en XUL avec un seul code fonctionnant sur toutes les plateformes Mozilla.

Séparation de l'aspect et de la logique de l'application L'un des inconvénients majeurs de la plupart des application Web est le lien étroit entre les éléments de l'interface et la logique de l'application. Cela pose un problème qui n'est pas insignifiant lorsque que l'on travaille en équipe, parce que les compétences requises pour développer ces deux aspects appartiennent souvent à des personnes différentes.

XUL donne une séparation clair entre la définition de l'application et la logique de programmation ("contenu" constitué de XUL, XBL, et JavaScript), la présentation ("skin" constitué de CSS et d'images), et les labels spécifiques au langage ("locale" constitué de DTDs, paquets de chaînes de caractères dans des fichiers .properties). La mise en page et l'apparence des applications XUL peut être transformée indépendamment de la définition de l'application et de sa logique. Encore mieux, l'application peut être localisée pour différents langages et régions indépendamment de sa logique ou de sa présentation.

Ce degré de séparation permet d'avoir des applications plus faciles à maintenir par les programmeurs et rapidement modifiables pour les designers et les traducteurs.

La superposition de ces deux activités indépendante est plus facilement coordonnée qu'avec des applications basées sur l'HTML, avec un impact moindre sur la stabilité générale et la qualité du système.

Modification, localisation ou marquage faciles Un autre bénéfice très pratique de la séparation entre ce que XUL fournit et la logique, la présentation, et le "texte du langage" est la facilité d'adaptation pour différents clients ou groupes d'utilisateurs.

Un développeur peut maintenir une base de code primaire pour son application et adapter le logo et l'appellation pour chacun de ses clients en distribuant plusieurs skins. Une application qui est écrite et déployée avec une interface utilisateur en anglais peut être traduite en français pour le même client. While such changes are extensive and affect most (if not all) of the application, they are also isolated from one another enabling the core XUL definition and application logic to be shared among all of the custom versions.

Technologies supportées

There are number of other technologies introduced by Mozilla that complement XUL for building cross platform web applications.

</tr></tr></tr>
XBL The eXtensible Bindings Language (XBL) is a markup language that defines special new elements, or "bindings" for XUL widgets. With XBL, developers can define new content for XUL widgets, add additional event handlers to a XUL widget, and add new interface properties and methods. Essentially, XBL empowers developers with the ability to extend XUL by customizing existing tags and creating new tags of their own.

By using XBL, developers can easily build custom user interface widgets such as progress meters, fancy pop-up menus, and even toolbars and search forms. These custom components can then be used in XUL applications by specifying the custom tag and associated attributes.

Overlays Overlays are XUL files used to describe extra content for the UI. They are a general mechanism for adding UI for additional components, overriding small pieces of a XUL file without having to resupply the whole UI, and reusing particular pieces of the UI.

Overlays are a powerful mechanism for customizing and extending existing applications because they work in two related but highly different ways. In one respect, Overlays are synonymous with "include" files in other languages because an application may specify that an Overlay be included in its definition. But Overlays can also be specified externally, enabling the designer to superimpose them upon an application without changing the original source.

In practical terms, this enables developers to maintain one code stream for a given application, then apply custom branding or include special features for customers with a completely independent code base. This leads to an overall solution that is easier and less costly to maintain in the long run.

There is an additional benefit to Overlays for software developers who intend to add features to Mozilla that they wish to keep proprietary. The Netscape Public License (NPL) and Mozilla Public License (MPL) require developers who alter original work (source code files that are provided with Mozilla) to release the source code for these changes to their customers. Overlays can be used to add features to Mozilla without contaminating the original open source code with proprietary alterations.

XPCOM/XPConnect XPCOM and XPConnect are complementary technologies that enable the integration of external libraries with XUL applications.

XPCOM, which stands for Cross Platform Component Object Model, is a framework for writing cross-platform, modular software. XPCOM components can be written in C, C++, and JavaScript, and they can be used from C, C++, JavaScript, Python, Java, and Perl.

XPConnect is a technology which enables simple interoperation between XPCOM and JavaScript. XPConnect allows JavaScript objects to transparently access and manipulate XPCOM objects. It also enables JavaScript objects to present XPCOM compliant interfaces to be called by XPCOM objects.

Together, XPCOM and XPConnect enable developers to create XUL applications that require the raw processing power of compiled languages (C/C++) or access to the underlying operating system.

XPInstall XPInstall, Mozilla's Cross Platform Install facility, provides a standard way of packaging XUL application components with an install script that Mozilla can download and execute.

XPInstall enables users to effortlessly install new XUL applications over the Internet or from corporate intranet servers. To install a new application the user need only click a hypertext link on a web page or in an email message and accept the new package through a Mozilla install dialog.

todo: describe cool toolkit and xul runner features

Etude de cas : Un logiciel calendrier Mozilla

This mini case study describes how OEone Corporation (http://www.oeone.com) integrated its Calendar application with the core Mozilla product. The Calendar application is comprised of a XUL front end and an XPCOM component that leverages libical, a native library written in C, for date operations and calendar data storage. The Calendar was initially developed exclusively for Linux but was successfully ported to both Macintosh and Windows within a week.

XUL provides a rich set of UI components. The user interface for the Calendar is written entirely in XUL, JavaScript, and CSS, which is a testament to the power and flexibility of this application building framework. It uses simple XUL components like boxes, grids, and stacks to compose views for the weeks, days, and months. The initial implementation of Calendar did not exploit XBL because the developers involved were not experienced with this complementary technology. But future plans for the Calendar include converting many of these UI components to XBL widgets to further simplify their implementation.

XPCOM/XPConnect enables integration of native code. A fully-featured open source calendar library, libical (http://www.softwarestudio.org/libical/), was harvested for the Calendar project. Libical is an Open Source implementation of the IETF's iCalendar Calendaring and Scheduling protocols. (RFC 2445, 2446, and 2447). It parses iCal components and provides a C API for manipulating the component properties, parameters, and subcomponents. The library was initially integrated by writing an XPCOM wrapper to adapt its interface. To improve performance a greater proportion of application logic was migrated from JavaScript to the XPCOM component.

Separation of presentation from logic makes applications resilient to change. The original UI implementation made extensive use of graphics for rendering the month and week views. Later, as the developers learned more about XUL and the implementation of the basic components matured, better ways were identified to simplify the composition of the UI. This lead to increased screen drawing performance and reduced memory and disk footprint requirements of the application. The UI for the month and week views was practically rewritten while the application logic remained virtually unchanged.

Porting XUL applications to other platforms is trivial. The Calendar originated as a Linux application with no consideration given to porting it to other platforms. But later, when the original developer (OEone Corporation) contributed the source to the Mozilla project, the Calendar had to be migrated to the Windows and Macintosh platforms. The UI for the XUL application required zero porting effort because it worked with almost no alteration on both new platforms. Similarly, since the UI code is written in JavaScript, the interaction logic worked with no effort. However, since the libical library is written in C, more significant effort was required to migrate this component to the other platforms.

Fortunately an implementation of the libical library was already available for Macintosh so, with the cross platform nature of XPCOM, a Macintosh calendar implementation was working within a few days. However, there was no existing Win32 port available, so developers had to undertake a porting effort to migrate libical to Windows. Within a week this too was complete and Mozilla had a working calendar for all three primary platforms: Linux, Macintosh, and Windows.

XPInstall is easy for developers and for users. The Calendar is not a planned deliverable for the Mozilla 1.0 release, and therefore is not included as a standard component in regular nightly and milestone release builds. Developers who are equipped with the software and knowledge required to compile Mozilla can set an optional environment variable and build the Calendar themselves. But many Mozilla users who want to try out the Calendar can't afford this luxury. Using XPInstall it was easy for the developers to package a version of Calendar that could be installed directly over the Internet by clicking a link.

Conclusion

Mozilla, featuring XUL, delivers a compelling technology for developing cross platform applications with the same rich user interface and end user experience as native desktop applications. Designers who are experienced in building web applications using W3C standard technologies can leverage this experience from the browser directly to the desktop.

Before the web became the standard for delivering applications to users across disparate desktops, this problem was solved with cross platform client-server tools. But these offerings were invariably proprietary, cost a substantial amount of money per developer, and had runtime license fees that kept you humble and tightly tethered to the vendor. Mozilla delivers much of the same value as these cross platform tools, but with an open source license.

As a rapidly maturing cross platform technology, XUL could fill an interesting void for technologies such as Java J2EE and Microsoft .Net which focus on enabling network access to distributed objects. Dynamic application logic can benefit significantly from a UI presentation layer that is standards-based, scriptable, extensible, and similarly distributable over the Internet.

XUL blurs the distinction between desktop application and Internet browser apps because it is firmly entrenched in both worlds. Some web applications will benefit from being migrated to XUL because of the enhanced UI capabilities, consistent implementation of the specification across supported platforms, and access to native resources such as shared libraries and the local file system.

Whether you need to migrate an existing web application to the desktop, are looking for a technology that will enable you to easily port your applications to multiple platforms, or want to integrate your own cool features into the browser, XUL warrants serious consideration.

Références

  1. XUL documentation on MDC, including the XUL Tutorial and the XUL Reference
  2. XUL Overlays
  3. XBL documentation: XBL introduction, XBL reference
  4. XPCOM documentation
  5. XPConnect (Scriptable components) documentation. See also http://www.mozilla.org/scriptable/
  6. Extensions documentation, including the Building an Extension introductory tutorial
  7. Mozilla Calendar project page

Informations sur le document original

  • Auteur : Peter Bojanic
{{ wiki.languages( { "zh-tw": "zh_tw/The_Joy_of_XUL", "en": "en/The_Joy_of_XUL", "ja": "ja/The_Joy_of_XUL", "pl": "pl/Zabawa_j\u0119zykiem_XUL" } ) }}

Source de la révision

<p>
{{template.Traduction_en_cours("The Joy of XUL")}}
Public visé : Les développeurs d'application et les chefs développeurs qui cherchent à mieux comprendre XUL et pourquoi la plateforme Mozilla est basée dessus.
</p>
<h3 name="Introduction"> Introduction </h3>
<p><a href="fr/XUL">XUL</a> (prononcé "zoul") est le langage d'interface utilisateur de Mozilla basé sur XML permettant de développer des applications multiplateformes riches en fonctionnalités et pouvant tourner connectée ou non à Internet. Ces applications  sont facilement modifiables avec des textes, graphismes, et mises en page alternatifs, de telle manière qu'elles peuvent être facilement marquées ou localisées pour différents marchés. Les développeurs Web déjà familiers avec l'HTML Dynamique (<a href="fr/DHTML">DHTML</a>) pourront développer tout des suite des applications .
</p><p>Ce document décrira les irrésistibles raisons pour les développeurs d'application de choisir XUL et la technologie Mozilla pour développer des applications multiplateformes. Cette même enquête donnera des explications suffisantes des motivations de Mozilla dans le développement XUL et pourquoi la plateforme de Mozilla est basée dessus. Les fonctionnalités clé et les avantages de XUL seront explorés suivis d'un tour d'horizon des technologies soutenues par Mozilla. Enfin, une petite étude de cas d'un logiciel calendrier écrit avec XUL montrera les avantages de développer une application avec Mozilla.
</p>
<h3 name="Fonctionnalit.C3.A9s_cl.C3.A9_et_avantages"> Fonctionnalités clé et avantages </h3>
<table class="standard-table">
  <tbody><tr>
    <td>Langage de balisage puissant basé sur les widgets</td>
    <td>Le but de XUL est de construire des applications multiplateformes, en contraste avec le DHTML qui est conçu pour développer des pages Web. C'est pour ces raisons que XUL est orienté vers des artéfacts présents dans les applications comme les fenêtres, les labels et les boutons, au lieu d'être orienté vers les pages, niveaux de titre, et liens hypertextes.
<p>En fait, beaucoup de développeurs investissent des efforts considérables pour obtenir un résultat comparable dans leurs applications Web DHTML au prix de la complexité, des performances, et du respect des standards. 
</p>
</td></tr>
  <tr>
    <td>Basé sur des standards existants</td>
    <td>XUL est un langage basé sur le standard XML 1.0 du W3C. Les applications écrites en XUL aussi sont basées sur d'autres standards du W3C tels que HTML 4.0; les Feuilles de Style en Cascade (CSS) 1 et 2; le modèle de document objet (DOM) niveaux 1 et 2; Javascript 1.5, incluant ECMA-262 Edition 3 (ECMAscript); XML 1.0.
<p>mozilla.org va plus loin en cherchant à obtenir une standardisation du W3C pour l'eXtensible Binding Language (XBL) (voir "Technologies supportées", ci-dessous).
</p>
</td></tr>
  <tr>
    <td>Portabilité de la plateforme</td>
    <td>
<p>A l'instar de l'HTML, XUL est conçu pour être indépendant de la plateforme,   rendant les applications facilement portables à tous les systèmes d'exploitation sur lesquels Mozilla tourne. Si l'on considère le large éventail de plateformes qui actuellement supportent Mozilla, cela peut être une des caractéristiques intéressantes de XUL en tant que technologie pour développer des applications. 
</p><p>Puisque XUL donne une abstraction des composants de l'interface utilisateur,  il tient la promesse d'écrire une fois, exécuter partout (NdT : write-once, run anywhere pour les anglophones). L'interface de toutes les applications  phares de Mozialla (Browser, Messenger, Address Book, etc.) est écrite en XUL avec un seul code fonctionnant sur toutes les plateformes Mozilla.
</p>
</td></tr>
  <tr>
    <td>Séparation de l'aspect et de la logique de l'application</td>
    <td>L'un des inconvénients majeurs de la plupart des application Web est le lien étroit entre les éléments de l'interface et la logique de l'application. Cela pose un problème qui n'est pas insignifiant lorsque que l'on travaille en équipe, parce que les compétences requises pour développer ces deux aspects appartiennent souvent à des personnes différentes. 
<p>XUL donne une séparation clair entre la définition de l'application et la logique de programmation ("contenu" constitué de XUL, XBL, et JavaScript), la présentation ("skin" constitué de CSS et d'images), et les labels spécifiques au langage ("locale" constitué de DTDs, paquets de chaînes de caractères dans des fichiers .properties). La mise en page et l'apparence des applications XUL peut être transformée indépendamment de la définition de l'application et de sa logique. Encore mieux, l'application peut être localisée pour différents langages et régions indépendamment de sa logique ou de sa présentation.
</p><p>Ce degré de séparation permet d'avoir des applications plus faciles à maintenir par les programmeurs et rapidement modifiables pour les designers et les traducteurs.
</p><p>La superposition de ces deux activités indépendante est plus facilement coordonnée qu'avec des applications basées sur l'HTML, avec un impact moindre sur la stabilité générale et la qualité du système.
</p>
</td></tr>
  <tr>
    <td>Modification, localisation ou marquage faciles</td>
    <td>Un autre bénéfice très pratique de la séparation entre ce que XUL fournit et la logique, la présentation, et le "texte du langage" est la facilité d'adaptation pour différents clients ou groupes d'utilisateurs.
<p>Un développeur peut maintenir une base de code primaire pour son application et adapter le logo et l'appellation pour chacun de ses clients en distribuant plusieurs skins. Une application qui est écrite et déployée avec une interface utilisateur en anglais peut être traduite en français pour le même client. While such changes are extensive and affect most (if not all) of the application, they are also isolated from one another enabling the core XUL definition and application logic to be shared among all of the custom versions. 
</p>
</td></tr></tbody></table>
<h3 name="Technologies_support.C3.A9es"> Technologies supportées </h3>
<p>There are number of other technologies introduced by Mozilla that complement XUL for building cross platform web applications.
</p>
&lt;/tr&gt;&lt;/tr&gt;&lt;/tr&gt;<table class="standard-table">
  <tbody><tr>
    <td><a href="fr/XBL">XBL</a></td>
    <td>The eXtensible Bindings Language (XBL) is a markup language that defines special new elements, or "bindings" for XUL widgets. With XBL, developers can define new content for XUL widgets, add additional event handlers to a XUL widget, and add new interface properties and methods. Essentially, XBL empowers developers with the ability to extend XUL by customizing existing tags and creating new tags of their own.
<p>By using XBL, developers can easily build custom user interface widgets such as progress meters, fancy pop-up menus, and even toolbars and search forms. These custom components can then be used in XUL applications by specifying the custom tag and associated attributes.
</p>
</td></tr>
<tr><td><a href="fr/Overlay">Overlays</a></td>
<td>Overlays are XUL files used to describe extra content for the UI. They are a general mechanism for adding UI for additional components, overriding small pieces of a XUL file without having to resupply the whole UI, and reusing particular pieces of the UI.
<p>Overlays are a powerful mechanism for customizing and extending existing applications because they work in two related but highly different ways. In one respect, Overlays are synonymous with "include" files in other languages because an application may specify that an Overlay be included in its definition. But Overlays can also be specified externally, enabling the designer to superimpose them upon an application without changing the original source.
</p><p>In practical terms, this enables developers to maintain one code stream for a given application, then apply custom branding or include special features for customers with a completely independent code base. This leads to an overall solution that is easier and less costly to maintain in the long run.
</p><p>There is an additional benefit to Overlays for software developers who intend to add features to Mozilla that they wish to keep proprietary. The Netscape Public License (NPL) and Mozilla Public License (MPL) require developers who alter original work (source code files that are provided with Mozilla) to release the source code for these changes to their customers. Overlays can be used to add features to Mozilla without contaminating the original open source code with proprietary alterations.
</p>
</td>
<td><a href="fr/XPCOM">XPCOM</a>/<a href="fr/XPConnect">XPConnect</a></td>
<td>XPCOM and XPConnect are complementary technologies that enable the integration of external libraries with XUL applications.
<p>XPCOM, which stands for Cross Platform Component Object Model, is a framework for writing cross-platform, modular software. XPCOM components can be written in C, C++, and JavaScript, and they can be used from C, C++, JavaScript, <a href="fr/Python">Python</a>, Java, and Perl.
</p><p>XPConnect is a technology which enables simple interoperation between XPCOM and JavaScript. XPConnect allows JavaScript objects to transparently access and manipulate XPCOM objects. It also enables JavaScript objects to present XPCOM compliant interfaces to be called by XPCOM objects.
</p><p>Together, XPCOM and XPConnect enable developers to create XUL applications that require the raw processing power of compiled languages (C/C++) or access to the underlying operating system.
</p>
</td>
<td><a href="fr/XPInstall">XPInstall</a></td>
<td>XPInstall, Mozilla's Cross Platform Install facility, provides a standard way of packaging XUL application components with an install script that Mozilla can download and execute.
<p>XPInstall enables users to effortlessly install new XUL applications over the Internet or from corporate intranet servers. To install a new application the user need only click a hypertext link on a web page or in an email message and accept the new package through a Mozilla install dialog.
</p>
</td>
</tr></tbody></table>
<p><span class="comment">todo: describe cool toolkit and xul runner features</span>
</p>
<h3 name="Etude_de_cas_:_Un_logiciel_calendrier_Mozilla"> Etude de cas : Un logiciel calendrier Mozilla </h3>
<p>This mini case study describes how OEone Corporation (http://www.oeone.com) integrated its Calendar application with the core Mozilla product. The Calendar application is comprised of a XUL front end and an XPCOM component that leverages libical, a native library written in C, for date operations and calendar data storage. The Calendar was initially developed exclusively for Linux but was successfully ported to both Macintosh and Windows within a week.
</p><p><i>XUL provides a rich set of UI components.</i> The user interface for the Calendar is written entirely in XUL, JavaScript, and CSS, which is a testament to the power and flexibility of this application building framework. It uses simple XUL components like boxes, grids, and stacks to compose views for the weeks, days, and months. The initial implementation of Calendar did not exploit XBL because the developers involved were not experienced with this complementary technology. But future plans for the Calendar include converting many of these UI components to XBL widgets to further simplify their implementation.
</p><p><i>XPCOM/XPConnect enables integration of native code.</i> A fully-featured open source calendar library, libical (http://www.softwarestudio.org/libical/), was harvested for the Calendar project. Libical is an Open Source implementation of the IETF's iCalendar Calendaring and Scheduling protocols. (<a class="external" href="http://tools.ietf.org/html/rfc2445" title="http://tools.ietf.org/html/rfc2445">RFC 2445</a>, 2446, and 2447). It parses iCal components and provides a C API for manipulating the component properties, parameters, and subcomponents. The library was initially integrated by writing an XPCOM wrapper to adapt its interface. To improve performance a greater proportion of application logic was migrated from JavaScript to the XPCOM component.
</p><p><i>Separation of presentation from logic makes applications resilient to change.</i> The original UI implementation made extensive use of graphics for rendering the month and week views. Later, as the developers learned more about XUL and the implementation of the basic components matured, better ways were identified to simplify the composition of the UI. This lead to increased screen drawing performance and reduced memory and disk footprint requirements of the application. The UI for the month and week views was practically rewritten while the application logic remained virtually unchanged.
</p><p><i>Porting XUL applications to other platforms is trivial.</i> The Calendar originated as a Linux application with no consideration given to porting it to other platforms. But later, when the original developer (OEone Corporation) contributed the source to the Mozilla project, the Calendar had to be migrated to the Windows and Macintosh platforms. The UI for the XUL application required zero porting effort because it worked with almost no alteration on both new platforms. Similarly, since the UI code is written in JavaScript, the interaction logic worked with no effort. However, since the libical library is written in C, more significant effort was required to migrate this component to the other platforms.
</p><p>Fortunately an implementation of the libical library was already available for Macintosh so, with the cross platform nature of XPCOM, a Macintosh calendar implementation was working within a few days. However, there was no existing Win32 port available, so developers had to undertake a porting effort to migrate libical to Windows. Within a week this too was complete and Mozilla had a working calendar for all three primary platforms: Linux, Macintosh, and Windows.
</p><p><i>XPInstall is easy for developers and for users.</i> The Calendar is not a planned deliverable for the Mozilla 1.0 release, and therefore is not included as a standard component in regular nightly and milestone release builds. Developers who are equipped with the software and knowledge required to compile Mozilla can set an optional environment variable and build the Calendar themselves. But many Mozilla users who want to try out the Calendar can't afford this luxury. Using XPInstall it was easy for the developers to package a version of Calendar that could be installed directly over the Internet by clicking a link.
</p>
<h3 name="Conclusion"> Conclusion </h3>
<p>Mozilla, featuring XUL, delivers a compelling technology for developing cross platform applications with the same rich user interface and end user experience as native desktop applications. Designers who are experienced in building web applications using W3C standard technologies can leverage this experience from the browser directly to the desktop.
</p><p>Before the web became the standard for delivering applications to users across disparate desktops, this problem was solved with cross platform client-server tools. But these offerings were invariably proprietary, cost a substantial amount of money per developer, and had runtime license fees that kept you humble and tightly tethered to the vendor. Mozilla delivers much of the same value as these cross platform tools, but with an open source license.
</p><p>As a rapidly maturing cross platform technology, XUL could fill an interesting void for technologies such as Java J2EE and Microsoft .Net which focus on enabling network access to distributed objects. Dynamic application logic can benefit significantly from a UI presentation layer that is standards-based, scriptable, extensible, and similarly distributable over the Internet.
</p><p>XUL blurs the distinction between desktop application and Internet browser apps because it is firmly entrenched in both worlds. Some web applications will benefit from being migrated to XUL because of the enhanced UI capabilities, consistent implementation of the specification across supported platforms, and access to native resources such as shared libraries and the local file system.
</p><p>Whether you need to migrate an existing web application to the desktop, are looking for a technology that will enable you to easily port your applications to multiple platforms, or want to integrate your own cool features into the browser, XUL warrants serious consideration.
</p>
<h3 name="R.C3.A9f.C3.A9rences"> Références </h3>
<ol><li> <a href="fr/XUL">XUL</a> documentation on MDC, including the <a href="fr/XUL_Tutorial">XUL Tutorial</a> and the <a href="fr/XUL_Reference">XUL Reference</a>
</li><li> <a href="fr/XUL_Overlays">XUL Overlays</a>
</li><li> <a href="fr/XBL">XBL</a> documentation: <a href="fr/XUL_Tutorial/Introduction_to_XBL">XBL introduction</a>, <a href="fr/XBL/XBL_1.0_Reference">XBL reference</a>
</li><li> <a href="fr/XPCOM">XPCOM</a> documentation
</li><li> <a href="fr/XPConnect">XPConnect</a> (Scriptable components) documentation. See also http://www.mozilla.org/scriptable/
</li><li> <a href="fr/Extensions">Extensions</a> documentation, including the <a href="fr/Building_an_Extension">Building an Extension</a> introductory tutorial
</li><li> <a class="external" href="http://www.mozilla.org/projects/calendar/">Mozilla Calendar project page</a> 
</li></ol>
<div class="originaldocinfo">
<h3 name="Informations_sur_le_document_original"> Informations sur le document original </h3>
<ul><li> Auteur : Peter Bojanic
</li></ul>
</div>
<div class="noinclude">
</div>
{{ wiki.languages( { "zh-tw": "zh_tw/The_Joy_of_XUL", "en": "en/The_Joy_of_XUL", "ja": "ja/The_Joy_of_XUL", "pl": "pl/Zabawa_j\u0119zykiem_XUL" } ) }}
Revenir à cette révision