There are two widespread complaints about Motif.
The first complaint is that it is expensive commercial software.
The second complaint is that it is not suited for being used
in object oriented programs written in C++ .
Our answer to the first complaint is that people do not have to
buy Motif for working with TCM. On some systems, like Solaris,
Motif is part of the standard software. On others, like Linux, Motif is not
included. But we have made Motif libraries part of the TCM executables
for these systems. This is allowed by the Motif copyright.
Furthermore, the application environment specification of Motif is
free, and work is in progress to create a public domain Motif
clone, called LessTif
(see http://www.lesstif.org
).
Our answer to the second complaint, about C++ and Motif, is that in theory,
it is true. But with the right discipline you can write object oriented
programs in almost any programming language and without discipline you
cannot write object oriented programs in C++ (as C++ is a hybrid between
an object oriented and a procedural programming language).
Young [1] gives a good introduction to Motif programming
in C++. What counts most is that the program is based on an object
oriented specification and design and that a suitable mapping is found to the
programming language. We claim that this is the case for TCM:
It is based on an object oriented specification and design and
this design maps almost directly to the program which is a
combination of C++ and Motif, whose interface happens to be
a C library. TCM could also be written in another programming
language. In fact, this is already happening, see question A.17.
But why is Motif used and not some of the other GUI libraries?
Motif gives us a lot of advantages. It is fast and very reliable.
Motif is standardized and very well documented. There are a lot of very
good learning and reference books for Motif such
as [1,2,3,8] .
The Motif interface is more or less standard in Unix systems, often
in form of the common desktop environment (CDE). There are also
many standard and free Motif widgets. The user does not need much time to
learn to work with a Motif GUI and the user does not need to
install special software to be able to use it.
Of course we found also some disadvantages: it costs some time for a programmer to master Motif and there are certain things that have to be done in the underlying layers of Motif: Xt and Xlib, which are more complicated from a programmer's point of view. Furthermore, Motif applications are compiled, not interpreted, which makes Motif not well suited for very rapid prototyping or programming by trial and error, like you can do in Tcl/Tk. This means that you have to know what you want to program in advance.