Graphical user interfaces are not really a new invention, and still, I don’t see that any vendor has come up with a really good toolkit for creating GUIs. What’s taking them so long, and where are we actually heading with the current user interface development?
State of the nation
Currently, there are two major kinds of approaches: One are declarative user interfaces, the other is what I call procedural interfaces. Procedural interfaces is what Qt, GTK, FLTK, wxWidgets, WinForms and quite a few other toolkits give you. On startup, some code like “create a button, add to layout” is executed. For creation, you usually use some designer tool which creates this procedural code and hides them from the developer, as it tends to be extremely ugly.
The nice thing about fully procedural interfaces is that they are easy to create on-the-fly. The not-so-funny part is that the UI creation code is often interwoven with the application logic (event handlers, anyone?). On the desktop, these kind of toolkits are very popular, as they don’t require much resources during creation and easily support custom widgets (the “direct rendering” mode is usually quite sophisticated).
Of course, this only covers the cases where you can live with the user-created widgets. For custom widgets, there is basically no real choice besides having a fully procedural painting engine. For this, Qt’s QPainter is actually very nice example: It is a really clean, low-level drawing interface. I’m not so sure that a more scene-graph oriented approach is really suited for the low-level drawing, especially performance wise – think about creating a plot with line segments vs. drawing the line directly.
For the future, I wish that the various vendors can agree on some standard – similar to HTML – for declarative UI development. The display-engine for it can be different for each platform (I have no problem with widgets looking differently, as long as the layout engine can cope with it). For low-level drawing, some kind of minimal draw toolkit should be provided (similar to QPainter) with a specified minimum set of operations.