O'Reilly Unix Center
Volume 6B: Motif Reference Manual, 2nd Edition

Motif Author Responds to a Reader's Comments

Editor's Note: On April 5th we published an article titled Is Motif Dead? No Way!, by Antony Fountain, co-author of our newly released book Volume 6B: Motif Reference Manual, 2nd Edition. In the article, Antony argues quite forcefully that Motif is not only very much alive, but is instrumental to the development of large-scale Unix applications. On April 6th we received the following email from Chris Wareham, a self-described "former Motif programmer" who now develops with GTK+. Chris took exception to several of Antony's points and we asked for permission to publish his letter. In the spirit of fairness, we also invited Antony to respond. Their dialogue follows.

Date: April 6 2000
From: Chris Wareham
Subject: Regarding the "Is Motif Dead?" article

As a former Motif programmer I read your current article asking whether Motif is "dead" with some interest. While it was obviously tied in with the release of an updated Motif reference book, the article focused on perceived shortcomings in more popular toolkits like Qt and GTK+. I cannot speak for Qt, as I am not a keen C++ programmer, but I now do all my GUI programming using GTK+. I consequently found the comments about GTK+ a little bit partisan and very inaccurate.

Firstly, Antony Fountain points out that GTK+ and Qt are easier to program in than Motif. This is Motif's biggest weakness. Regardless of whether it is better looking or more fully featured than the new toolkits, Motif falls down because development times are so much longer. It is all too easy to make subtle errors when instantiating Motif widgets, as type checking of widget attributes is virtually non-existent.

As for whether Motif is better looking than its younger competitors, that is a very subjective thing. However, to argue that Motif is simply more consistent because of its design guide is misleading. The style guide is out of date, and rarely read by the Motif developers I worked with. The richer palette of widgets that comes with GTK+ and the Gnome libraries enforces a consistent look and feel much more effectively than a largely ignored style guide.

Fountain then claims there is good commercial support for Motif. That's patently untrue, as the few companies who offered GUI builders or custom widget libraries have been reduced to a handful of consultancies. These small, specialised companies do not make a viable support base.

There are certainly no commercial GUI builders for GTK+, but there are several free ones--including the superb Glade, which eclipses any GUI builder I saw for Motif. There are also a choice of IDE's for Qt and GTK+, most notably Kdevelop, which again surpasses anything offered for Motif.

Next, Fountain plays up Motif's tight integration with Xt. This is a two edged blade, as once wedded to Xt's convenience routines it is very hard to port an application from it. This has hindered the popularity of NEdit (the notable programmers' text editor), which would require a total rewrite to make it portable.

As for internationalisation in Motif (which it inherits from Xt), it is very outdated and tedious to work with. It is also a little disingenuous to describe GTK+ as lacking in internationalisation features. It has GNU gettext support, which is far more elegant than Xt's internationalisation. There is also a near complete implementation of Pango which brings support for languages and character sets way beyond the scope of Xt. The admittedly poor GTK+ text widget has a number of replacements on the way; it is simply a case of the GTK+ developers settling for the best one before 1.4 is released.

In conclusion, Motif isn't dead. It is simply awaiting its pension before disappearing into retirement. Development on Motif has ground to a halt, while that of GTK+ and Qt continues at a breakneck pace. The only rational reason to stick with Motif is for that stability of the API--as long as you can live with it's "designed by committee" complexity, lack of features and pitiful commercial support.

-Chris Wareham

P.S. How about teaming up with RedHat software to produce the definitive GTK+ books (volumes 9A and 9B of the X Window series perhaps?).

From: Antony Fountain
Date: April 11, 2000
Subject: The Author Responds

Development time using a good GUI builder ought to be similar for all languages, and generate code such that the cited issues are redundant. Motif 2.x is worked out much better for C++ in any case. If you must hand write code, expect longer development times and increased bug rates. The view of the application becomes more abstract in a GUI builder, and more can be held in the programmer's head. Millions of lines of code simply demands automatic support.

I cited the GTK+/Qt style guides issue as evidence of a community symptom, not as proof of internal Motif consistency. The Motif Style Guide most certainly is read, but it is a guide, not a Bible. Some of the data are rules, others are hints, and time admittedly has rendered other points as out of date as GUI design moves on. Experience is the key: I would urge anyone developing interfaces to read the book or similar at least once for a general grasp of application GUI design. The interface is how the user interacts with a program; it makes or breaks the product irrespective of the algorithms behind.

I hotly dispute that GTK+ is "richer." I have integrated over 650 Motif-compatible components into X-Designer, from small components through to integrated MVC table/graph/chart systems. MVC components are absolutely essential for the very large-scale data manipulation and presentation in certain application domains. Where is the Linux toolkit equivalent of these?

As for commercial support, Sun Microsystems, Silicon Graphics, Hewlett Packard and all the other major UNIX operating system vendors continue to support Motif. The add-on components and GUI builders for Motif are fully mature. Commercial applications take years to develop because they have thousands of screens and millions of widgets: they must use a GUI builder capable of handling the connections between very large system modules. And because projects have a development cycle of years, there must be guaranteed on-line support for the duration. Although there are indeed some private GUI builders available for GTK+, this is no guarantee of continuance. The winner of the current LinuxWorld Editor's Choice Award for GUI builder is X-Designer, not Glade.

As for Xt and portability, I strongly recommend using the native GUI toolkit for porting. An emulation never quite succeeds in providing the full proper look and feel at all levels of detail, nor does it provide consistent bug compatibility. There's far more to porting than just running on the box That means, for Windows, use MFC. Using an X port or emulator for Windows is simply wrong in principle. By the same measure, so is using the "portability" of Qt or GTK+.

For cross-platform interface portability, the Java VM has become the de facto alternative native toolkit supported by major operating system vendors. However, Java can have serious performance issues associated with the interface: a compiled/interpreted language is not as fast as native machine code. Often Java is used on the server, with the client interface in the native toolkit: Motif or MFC. The correct porting model is Motif to Java, not Motif to GTK+ or Qt.

About internationalisation, I can name some Fortune 500 companies where GNU is explicitly banned because of the legal ramifications of the licenses. For commercial software, intellectual property rights are everything. Secondly, I did not say that GTK+ was internationalization-free; I said its support is non-standard and incomplete compared to Motif. There is much more to internationalisation than gettext/string and font support.

Finally, all software has a lifespan. Of course Motif will die eventually, as will GTK+ and Qt. The fundamental issues are: how do we get there from here? And once there, how do we keep from painting ourselves into a black hole if we need to bail out? My contention is that in the absence of either a complete component model or a cross-platform GUI builder for GTK+/Qt, there is no way to automatically migrate via Qt or GTK+ at either end. There are millions upon millions of lines of Motif out there, and the Linux toolkits do not even attempt to address this issue. Developers can go from Motif to Java or MFC using X-Designer and other X/Motif GUI builders automatically because the component model built into Xt enables construction of a code-free view of the application.

As for the future of Motif development? Watch this space.

--Antony Fountain

Return to:

O'Reilly Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies

© 2000, O'Reilly & Associates, Inc.