XUL is a tried and true application framework. In fact, the recently released Firefox 3.0 is not only built using XUL, but provides a XUL runtime environment that enables any Firefox user to run other XUL applications. In this tutorial, you start to program in XUL and learn about some tools to help you develop XUL apps. Build a XUL-based blog editor as you enhance your Web development skills to build desktop apps with XUL.
In this tutorial
XUL stands for the XML User Interface Language. Since it is XML, it is a declarative language with a rich set of UI widgets that can accelerate the development process. It is a cross-platform language, so you can build your XUL application on Linux™, and then run it on Windows®.
This tutorial is for experienced Web developers who are interested in branching out into desktop development, but do not want to learn a lot of new technologies. XUL (rhymes with cool) makes it easy to use Web development skills to build desktop applications. It gives you a rich set of UI widgets that have a very familiar syntax for any Web developer. It also lets you directly mix in HTML and makes heavy use of JavaScript.
Objectives
- Learn all about XUL, its roots and its use in Mozilla projects.
- Learn about the key benefits and architectural design of XUL, as well as how to build desktop applications that leverage your existing Web application skills.
- Discover the opportunities that Firefox 3.0 presents to XUL developers.
- Dig into XUL and write a simple application to create, save, and publish blog entries. This XUL-based blog editor gives you basic rich text editing, and allows you to save drafts locally that you can reload later for editing. The editor will also tap into the drawing capabilities of XUL to allow users to electronically sign their blogs.
Prerequisites
XUL is an XML-based language, so you'll need to be familiar with XML, especially XML namespaces. XUL is built on top of the Web technologies that you already know and love: HTML, JavaScript and CSS. You'll need to be familiar with those technologies to be productive in XUL. You can greatly increase the capabilities of XUL applications by using XPCOM. This is a technology that is similar to distributed computing technologies such as CORBA/IDL and COM. Familiarity with these technologies will help when learning about XPCOM, but is not required.