GUIs and their programming

Before starting an application, if we do not target a particular system, we should choose a graphical user interface, and a wide choice is offered to the programmer.

Graphical User Interface - GUI

But above all, for a lambda programmer, unrelated to a particular environment, a fact must be taken into consideration: the future of programming is not Windows (or any other system), it is in Web applications running on a server, so should we use a framework able to run on the most common servers, and so on Apache.

We can also talk about mobiles, but in this case we are facing a considerable fragmentation of environments, as discussed in the article Programming a mobile phone, which we wan overcome only with HTML 5.

WIMP

Classical user interface on the desktop operate on the WIMP principle. It is the acronym of Window, Icon, Menu, Pointing device. The principle was developed from 1973 by Xerox and popularized by Apple with the Macintosh and then by Microsoft from Windows 95.

This model is challenged by touch screens.

List of toolkits and platforms

Toolkits contain predefined components used directly to create the interface of an application.

Qt

Qt, acquired by Nokia, then by Digia, was originally mainly used by KDE on Linux. It spread to all systems and is now the basis for programming applications for mobiles by Nokia. The toolbox, QtClick, provide a lot of ready to use code.
Since version 5.1 applications run on Android and iOS as well.

Benefits

Disadvantages

JavaFX

The library of the Java programming language includes all components necessary to user interface. JavaFX makes it easier to build user interfaces.
It is possible to use Java classes in a C or PHP application.

Benefits

Disadvantages

WPF and WinRT

WPF is the GUI and devices layer on .NET. The API which provides access to all Windows services. WinRT is the runtime of Windows 8.

Benefits

Disadvantages.

Tcl/Tk

Tcl is a programming language and Tk a GUI toolkit, working with Tcl and other languages.

Benefits

Disadvantages

FTLK

Toolkit for creating graphical user interfaces in C.

Benefits

Disadvantages

GTK

The graphical framework for Gnome on Linux is ported to Windows. The best-known Windows application using this framework is the GIMP, and it is available on all operating systems.
There is a port of GTK for PHP, but not updated for ages and requires a modified version of the runtime.
GTK is considered as less convenient than Qt, to equal features, and more difficult to program.

wxWidget

Toolkit for Windows, Linux, Mac. It is used with different programming languages. Disadvantages appear at use due to its lack of flexibility.

FOX

Toolbox to create interfaces in C. Ported to Windows, Linux and other Unix.
Can help give the look of Windows applications on Linux.

SDL

Used especially for making games. This framework provides access to OpenGL and peripherals.
We can use many programming languages, including PHP, C, Java.

AIR

Programming applications in Flash. Very portable, but access to hardware is limited.

Basic APIs

There APIs are interfaces to the systems, providing primitives used to create a library of components.

OpenGL

Portable graphics library, an alternative to DirectX, for optimal performance. It interfaces with the graphics card, and user must have a version for his graphics card, if not already installed by the seller.
There is an interface to OpenGL for browsers, WebGL.

To build your own components, you can use a tool box as GLUT, which is not open source, unlike other libraries in this list. This will not approach the simplicity of Qt, but will be much lighter.

Cairo

Named first Xr, the Greek letters are pronounced Chi and Ro, which gave the new name.
Vector graphics API. Compatible with many systems and programming languages.
This is an interface between a toolkit and OpenGL or DirectX.

WebKit

The rendering engine of Chrome and Safari can also be used directly by an application and display HTML 5. There is a WebKit component in Qt.

The project Berkelium allows, like QtWebKit, integrating a browser into an application and use HTML 5  as interface language. The browser will then displayed as an objet in the scenery.

Berkelium, browser as object of interface

Clutter

A library  supported by Intel originally intended for Meego, the system for mobile, so using little space. This is actually an interface to OpenGL which simplifies its use. It has a toolbox, Mx (like QT has QtClick). The programming language is C++ or Python. The projet is now a part of Gnome.

DirectX

Interface to audio and graphic devices on Windows.

Conclusion

We see that when a framework offers the possibility of programming for mobile phones, one enters the circle of specializations, each platform running a system for a single brand.
Otherwise, when programming for the desktop but not specifically for Windows, Qt seems to be the most comprehensive framework while being portable. The license is LGPL.
Remain still the possibility to write his own components with OpenGL or WebKit if you need a very limited interface.

Resources

History and documents