Hitachi Vantara Pentaho Community Wiki

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

The Pentaho XUL Framework Developer's Guide

Project Details

Project Name

pentaho-xul

Project Description

The XUL Framework is a project that is attempting to provide an architecture for different UI technologies to be mapped and rendered from the the Mozilla XUL specification. The purpose is to be able to render a user interface across multiple technologies (Swing, SWT, GWT) without the overhead of rewriting the presentation layer every time, and providing technology agnostic business logic code for reusability.

Status

Currently in the process of merging with the Shandor XUL branch.

Source Location

svn://source.pentaho.org/svnroot/pentaho-commons/pentaho-xul/trunk

Future Mercurial Home

hg clone http://bitbucket.org/codeoncoffee/shandor-xul/

Lead Developer

Nick Baker

Use Cases

Pentaho's custom XUL framework exists so that developers can create user interface definitions that can be reused across multiple technologies and multiple products. As a consequence, you can also easily replace or redesign a user interface. The following use cases clarify the reasoning behind building the framework, and also help identify under what circumstances a developer may want to use the XUL framework instead of programming a traditional UI.

Use Case 1: Common Dialogs

All of the Pentaho tools share integration points with the platform, additional third party tools, and each other. These integration points usually require similar (if not identical) dialogs in the user interface in order to interact with that particular feature. Many of these tools are not built upon a common technology because they have separate origins. A common definition for the dialogs, along with a framework that supports the necessary renderers for that user interface definition, relieves the developer from having to change the layout or functionality, and from having to build the dialog from scratch every time a new tool comes along that is based on a new technology, or a new integration point requires another common user interface.

Use Case 2: Customizable Menu Systems and Toolbars

The Pentaho community, partners, and clients frequently request the ability to customize the options available in Pentaho client tools, as well as in the platform demo interfaces. Building the toolbars and menu systems in Pentaho's products using an XML definition allows developers to easily add or remove functional options. The XML definition describes the available options with a reference to how they should behave.

Use Case 3: New Tooling Applications

There are new applications in development which require the ability to plug into existing tools and future architectures. These "tooling applications" can generally be thought of and used as standalone applications, but don't make a lot of sense outside of the larger Pentaho client tools or the platform itself. The new Chart Editor is an example of such an application.

Overview

The XML User Interface Language (XUL) is an interface design language originally developed by the Mozilla Project for use in creating Web browser user interfaces. The project home page, which includes an in-depth explanation of the reference XUL implementation, is at http://www.mozilla.org/projects/xul/ . There is also a formal XUL 1.0 specification, but it is seven years old and mostly unwritten: http://www.mozilla.org/projects/xul/xul.html . You can find a better, more comprehensive set of XUL resources is in the Mozilla Developer Connection: http://developer.mozilla.org/en/docs/Category:XUL.

Writing user interfaces in XUL requires a complete implementation of a rendering engine to display them in. Gecko-based browsers such as Firefox, Netscape, Mozilla, and Galeon have XUL support built in, but others do not. Pentaho has its own entirely XUL 1.0 compliant rendering engine built into the BI Platform.

The XUL Framework starts by processing an XML user interface definition, as XUL is, inherently, an XML technology. The XUL specification lends itself well to providing definition for a standard widget toolset, the kind most developers would be comfortable with if they have used SWT or Swing. The spec does not allow for or account for more advanced components or completely customized components.

Pentaho has extended the XUL specification with its own namespace in order to accommodate advanced functionality and customized UI components. The rest of this document explains this custom implementation in detail.