IML

IML

Robbert Haarman

2010-12-11


Introduction

IML (Interface Modelling Language) is a language to describe graphical user interfaces. It separates the user interface from the application logic, can increase productivity, and can be implemented on any GUI toolkit. The cost of all this is a little extra code on top of the GUI toolkit and some time to parse the interface description.


Motivation

There are several toolkits for building graphical user interfaces. On GNU and BSD systems, GTK+ and Qt are in popular use. Other UNIX systems often primarily use Motif. Cocoa on Mac OS X implements the OpenStep API also implemented by GNUStep. Windows programs use yet other toolkits. All these toolkits have completely different APIs and look and feel, and although some are portable, that doesn't mean you can just write your application to one of these and expect users to install it. Users are (rightfully) reluctant to install another GUI toolkit when they already have one. Even if they do install the toolkit, your application will probably look out of place on their desktop, which is, after all, based on another toolkit. In short, writing a graphical user interface that works well on all platforms is close to impossible.

IML allows you to specify your GUI in a text file, which can then be loaded and rendered by the toolkit installed on the user's system. This saves you from having to port your application to different GUI toolkits. It also saves your users from having to install a GUI toolkit just to run your application. And your application will have the look and feel of an application native to your user's platform. As a bonus, IML provides a clean separation between application logic and user interface, and writing IML is easier and quicker than programming for a typical GUI toolkit.


Status

I currently have a proof of concept implementation for GTK+, along with a simple demo application. However, the DTD for IML is not finalized yet. I think I will base it on Mozilla's XUL.


Related Work

wxWidgets

wxWidgets (formerly known as wxWindows) is a cross-platform GUI toolkit written in C++ that renders interfaces using native widgets. It's API is supposedly similar to Microsoft Foundation Classes. In addition to widgets, it provides threads and sockets support, and its own string class. Support for XML GUI descriptions is in the works. Personally, I find the wxWidgets API ugly, and I have my gripes with common C++ implementations.

Glade

Glade is a GUI designer that can create GUIs for GTK+ and GNOME in various programming languages (C, C++, Ada, Perl and Python). It saves GUI descriptions in XML format.

GNUStep Renaissance

Renaissance defines an XML format for modelling GUIs. It works with both GNUStep and Cocoa, but currently (2004-08-22) supports only very few widgets.

Valid XHTML 1.1! Valid CSS! Viewable with Any Browser