Wednesday, November 30, 2005

XUL-based applications/environment on the Nokia 770 device

If you are one of those guys that enjoy a good discussion, probably mailing lists are good places for you waste some words, and point out your opinions. These days a thread was rounding the maemo-developers list. Again, it was discussing about 'why has Nokia chosen building maEmo as GTK-based instead of a QT*-based environment'. Of course, some flames and aggressiveness posts, but it was a good talking after all. So, let me I reopen up this talking (between me and myself, I know), but this time, I wanna go deeper, revolutionizing and flaming :p

LET'S RAMBLE ABOUT GUI toolkits ...

Graphical applications, in general, are built of "small" components like dialog buttons and mail inbox folders, which we collectively term "widgets." Within a widget, drawing and user interactions are completely under control of the individual widget, and set when the widget was built. Relative placement of widgets, their interactions with each other, and optionally some of their configuration, will be controlled by a UI layout specified in a script whose structure is defined in this and related documents.

That's what GTK (QT and whatever toolkit) provides to, and even in the case of maEmo that is it. Having more the one toolkits supported on the device is I'd say unfeasible (for performance and storage points). However, I was thinking: are GTK and QT* the only ones available ?

HAVE YOU HEARD ABOUT XUL ???

XUL (XML User Interface Language) is a user interface markup language developed to support Mozilla applications like Firefox and Mozilla Thunderbird. The point is: it's becoming bigger than what they had in mind. I'd say that it is one of the most powered languages for UI programming available so far. I mean its main benefit is that it provides a simple and portable definition of common widgets. This reduces the software development effort in a way analogous to the savings offered by 4GL tools.

XUL defines a wide range of elements, which roughly belong to the following types:
  • Top-level elements
e.g. window, page, dialog, wizard, etc.
  • Widgets
e.g. label, button, text box, list box, combo box, radio button, check box, tree, menu, toolbar, group box, tab box, color picker, spacer, splitter, etc.
  • Box model
e.g. box, grid, stack, deck, etc.
  • Events and Scripts
e.g. script, command, key, broadcaster, observer, etc.
  • Data source
e.g. template, rule, etc.
  • Others
e.g. overlay (analogous to SSI, but client side and more powerful), iframe, browser, editor, etc.

It is possible to use elements from other applications of XML within XUL documents, such as XHTML, SVG and MathML.

ps: Some common widgets - such as spinbox, slider, and canvas - are not available in the current XUL widget set, but are planned for XUL 2.0

AND SO ??? ...

Well, regarding embedded environments, I'm not sure about its usage on projects like maemo-xul (notice it does not exist at al). IMHO, XUL is not as mature as it should be for so, but the ideia exists

... hey ... pymaemo's been ported before ! What about xulmaemo !?!?. Programming using XML and has a build for GTk would be amazing, wouldn't it ?!

Antonio Gomes
tonikitoo at gmail dot com

2 comments:

Anonymous said...

It's true, a XUL interface system would be amazing.

Antonio said...

hi scott

I have not seen your post-comment (it is set 5th now)

I'll have a look , indeed ;)

thanks