Declarative User Interface

A declarative approach to defining an interface (e.g HTML, XUL or XAML) is a must for designers and is probably easier for programmers. In the java world, many of the key GUIs such as Swing, SWT and GWT do not support declarative user interface development to the same level of sophistication found in Microsoft's Windows Presentation Framework.

WPF, XAML and Silverlight

Microsoft appear to have stolen a march on the Java world with the new .NET user interface technologies. I look forward to working on a project that uses Expression Blend, WPF and XAML.

Java versions of XAML

There are various companies working on a java version of XAML; eface project has sub projects JellySwing and JellySWT that allow you to define the views of your Swing and SWT application in XML.

Compiling a User Interface Markup language

Though use of a markup language makes defining a user interface much easier and helps enforce the division between the view and the model and controller, there are certain advantages in writing a user in code; the compilation process checks the interface and you can use a debugger to step through the view.

I have written a user interface compiler that borrows many of the ideas from a GDMO compiler that I developed for automating the contruction of network management agents.

I have defined an XML user interface markup language in an XSD schema (see ui.xsd attached below). The GWT Wiki interface has been built using the markup language (see ui.xml attached below).

The approach I have adopted is to compile the markup language into user interface code using a templating code generator that uses the BeanShell as its scripting language. I have written beanshell templates that turn the xml markup into GWT code; in time I will write a version that generates SWT code.