Home arrow XML arrow Page 2 - Back to XUL: Introduction and Preparation

Back to XUL: Introduction and Preparation

XUL is an XML variant that can be used to create application user interfaces. It can also be used as an element in creating entire applications. This article, the first in a series, introduces you to the idea and helps you get your system ready to start creating.

Author Info:
By: Dan Wellman
Rating: 5 stars5 stars5 stars5 stars5 stars / 5
January 16, 2006
  1. · Back to XUL: Introduction and Preparation
  2. · Creating applications with XUL
  3. · Setting up your system for running XUL applications
  4. · More setup information

print this article

Back to XUL: Introduction and Preparation - Creating applications with XUL
(Page 2 of 4 )

XUL is just an XML variant used to describe interfaces, you may be thinking, so how can you create entire applications with it?  Well, the truth is, you canít.  You need something else to glue the various elements together and turn them into functioning entities that work together to actually do things.

XUL provides an excellent introduction to application programming; especially for those that have a good understanding of web design, because it gives you familiar tools to work with that can help to teach you some of the finer points of what is required to make a working application.  The language that is used to create the behind the scenes logic that makes the program work is the web programmerís old friend JavaScript. 

Although, that in itself is not entirely true either.  While JavaScript can handle many of the more basic operations used when interface elements are interacted with, there are some things for which it is simply not powerful enough; you canít use it, for example, to launch an operating system specific Ďopen fileí dialog box.  JavaScript is still the gateway to these higher functions though, and can be used to write XPCOM components that interact with the interfaces and components used in Mozilla.  XPCOM stands for Cross Platform Component Object Model, but while XPCOM, like XUL itself, is platform independent, expect very little support for it outside of Mozilla; MSIE for example falls over when trying to open XUL applications, having neither the interfaces nor the chrome architecture that are required. 

The chrome architecture provides a method for granting special permissions to XUL files, such as permission to open or write to files, among other things.  XUL files that have these permissions are accessed using a chrome URL, much in the same way as a web page is accessed via an HTTP URL.  Chrome includes all interface, presentation and locale files present and registered for you with Mozilla; it is a kind of catch-all term for these so when you add, say, a new toolbar to Mozilla, you are adding chrome. 

Like a browser that interprets HTML elements and displays them on-screen, XUL elements are rendered according to the Gecko layout engine, which controls, in part, how the components of the Mozilla browser and the files it displays appear.

All of these things and more combine with XUL to form fully functional applications that can run either within Mozilla or as separate applications in their own right (although components of Mozilla will be used when doing this).  During the course of these articles we will look at these in more detail.

Make no mistake however; the combination of XUL, JavaScript and XPCOM is not true application code, itís not C++ or anything.  It was designed to make browsers and other network applications, and it does this extremely well, but donít expect to see a XUL version of Photoshop in the near future.

blog comments powered by Disqus

- Open XML Finally Supported by MS Office
- XML Features Added to Two Systems
- Using Regions with XSL Formatting Objects
- Using XSL Formatting Objects
- More Schematron Features
- Schematron Patterns and Validation
- Using Schematron
- Datatypes and More in RELAX NG
- Providing Options in RELAX NG
- An Introduction to RELAX NG
- Path, Predicates, and XQuery
- Using Predicates with XQuery
- Navigating Input Documents Using Paths
- XML Basics
- Introduction to XPath

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 

Developer Shed Affiliates


© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials