So Twenty years ago, having a feature-packed application with no GUI was tolerable – but this is no longer the case nowadays. GUIs are especially important for Unix programmers, with Linux trying to gain an upper hand on the desktop.
If the choices of GUI toolkits are almost clear on Windows platforms, there are several prevalent toolkits on Linux and Unix in general. Let's have a look at them.
QT , developed by Trolltech, is considered by many to be an excellent example in terms of organization and ease-of-use. Qt is a multi-platform, C++ framework, which contains a vast range of UI widgets, along with other constructs, like linked lists or XML parsers. Despite being originally written for C++, various bindings for Qt, Perl, PHP, Ruby, LISP and others do exist.
Those who prefer Qt consider it stands out through its signal/slot paradigm which makes it very easy to connect the UI to the actual functions. However, Qt has the disadvantage of being very complex in terms of size and construction. Qt-based applications tend to be rather slow, due to its complexity. Another disadvantage is its heavy use of macros. Although these do decrease the complexity of the code, it also makes porting Qt applications very difficult.
GTK is the other major contender. Unlike Qt, is a C-based toolkit, and forms the base of Gnome. It has the advantage of being very fast, as well as being less complex in construction when compared to Qt. Being written in C, bindings for other languages were easier to develop, so virtually every modern programming language has GTK bindings, from Python to Ruby and LISP, and even to lesser-used languages like Ada, D or Euphoria.
However, GTK has its disadvantages. It relies heavily on callbacks, instead of the slot/signal paradigm that Qt uses. As a consequence, debugging GTK programs is often difficult, and many language hacks are employed. In addition, the documentation is of a sensibly lower quality when compared to Qt's.
wxWidgets is quickly catching up. wxWidgets uses an interesting approach – instead of drawing its own widgets, it provides a thin abstraction over the system's native widgets (e.g. Aqua on OS X, GTK or Motif on Linux and so on).
As a consequence, wxWidgets programs are extremely portable. However, wxWidgets has a rather poor documentation, and its bindings are often using incompatible branches (like PLT Scheme does). Although it had a growing userbase, wxWidgets is seriously losing field.
Motif is the grandfather of Unix GUI toolkits. It is famous for being insanely difficult to learn, a huge pain to debug and looking very ugly. Motif programs are difficult to port to unsupported platforms – but this is the important aspect of Motif: almost every platform is supported. Motif programs are basically guaranteed to run on any operating system that has an X11 implementation available – and almost all do, from DOS to AIX.
Motif is no longer widely used on the desktop, but many important Unix operating systems, including AIX and Solaris, use Motif-based programs extensively, and Motif-based programs are still being written.
The final choice greatly depends on one's end result. Qt is very useful when targeting all three major operating systems (Linux/Unix, Windows and OS X), also being easy to learn to the point of being productive, and benefiting from an excellent documentation. GTK is, however, the standard for Gnome – and Gnome is used by some major distributions as default, and is also the quickest choice when using C. wxWidgets, FLTK and Motif each have their own share of advantages, but these should probably be considered only when both Qt and GTK have been found to be unsatisfactory. I have found QT to be really Good(but than this is the only which I have extensively used).
Related Online Articles:
No comment yet. Be the first to post a comment.