SAN FRANCISCO (08/25/2000) - The Open Software Foundation (OSF), an industry consortium of Unix workstation vendors, developed Motif in 1989. Their aim was to ensure a consistent user experience -- in so doing, they focused on a style guide, a definition for a window manager, and a "look and feel" (L&F) in the personal-computing sense. Motif's visual style and semantics conform to IBM Corp.'s Common User Access (CUA) definition, as did contemporary Windows.
Motif's competitors in its infancy included Athena and OpenLook.
Motif was so successful that engineering and data-processing departments came to expect its high-quality look and feel. Most hardware vendors licensed the Motif library from OSF and its descendants and bundled it with their distribution operating systems. Thus, when you buy a modern Solaris, you receive a run-time library required to develop GUI applications.
Agreement on Motif frayed in the middle of the 1990s, as Unix vendors diverged slightly in their definition of the Common Desktop Environment (CDE). But perhaps the single most important event since Motif's original adoption by leading vendors occurred just a few months ago. On May 15, The Open Group (TOG), OSF's successor, released Motif's source code for use under open source operating systems (OSs).
The significance of this licensing change is yet to be determined. One impetus for the shift seems to be ISVs' interest in coordinating their inventory of Unix applications to fit the emerging Linux Standard Base (LSB) initiative.
This is similar to Motif in that many of its technical aspects make sense only in the context of once-standard software that is now aging.
Insiders hint that TOG might modify the license again to make it fully compliant with the open source definition. Vendors such as Metro Link have long provided high-quality Motif versions for Linux and other open source Unixes.
Moreover, the Hungry Programmers have been working for several years on LessTif, a reimplementation of Motif available under the GNU General Public License (GPL).
The announcement's most significant initial consequence might be the reminding of several hundred thousand Linux and BSD developers that there's an alternative to the GTK, Qt, Tk, and other toolkits that currently receive the majority of attention. As we'll see, there's plenty they'll want to know.
Motif is more than just another toolkit. It's the basis for thousands of successful applications, principally because Motif:
Is an accepted standard
Works on a wide variety of equipment
Provides User Interface Language (UIL)
Is an area of expertise for many
Has an unrivaled commercial infrastructure The Motif L&F is standard in many organizations, and associated with professionalism in others. While the consumer market expects shrink-wrapped applications to have a conventional Windows appearance, engineering users largely equate quality with Motif visuals. It's common for companies with large workstation fleets to require their purchases to conform to Motif in order to minimize training of their users. On the production side, ISVs often standardize on Motif as the market leader among GUI toolkits.
Motif's visual design is also admired. While it is difficult to report objectively on L&F, there are certainly those who prefer Motif's visuals to Windows's. Our best advice is to take a few test drives. See how comfortable you are with demonstration or open source Motif software. Decide for yourself which computer visuals are beautiful and which are ugly.
We often hear claims that Motif is singularly fast or demands little memory. In our own experience, Motif is a good performer in the same range as competing toolkits. It's near the head of the class, but not magically superior to others. What's important to remember is that Motif is designed for, and looks good on, 8-bit graphical displays; many commercial Unix machines are still sold with such hardware. (Applications that possess 24-bit capability can look quite uncomfortable when run on an earlier generation of equipment.) This factor has prompted several companies with large inventories of workstations to use only Motif, at least until they replace their hardware.
UIL is an interesting component of the Motif definition because it is a declarative alternative to more conventional procedural layout specifications.
Many, perhaps most, Motif programmers write applications in straight C code.
They lay out their applications' visual geometry by passing arguments to Motif library entry points.
However, it's also possible to specify layout in UIL in a higher-level, more declarative idiom. This encourages partition of an application's layout and its procedural aspects. In our experience, UIL-based developments have a good record of simplified testing and maintenance.
For many developers, UIL differentiates Motif from other alternatives. A few third-party add-ons define roughly analogous visual languages. Visual Basic and its competitors segment the visual positioning of a widget from its actions; however, they do not express it in plaintext accessible to an editor.
Subsequent articles in this series will show how Glade and Tk do much the same work as UIL, but for different graphical toolkits.
Nothing precisely duplicates UIL's operation, though. Motif includes a UIL compiler that transforms UIL text into C source code. This output is then compiled and linked with an application's other object files to make it executable. Many experienced developers find this approach advantageous.
One powerful force pushing organizations toward Motif is the availability and familiarity of Motif developers. There are at least several hundred thousand in the world, and, perhaps more importantly, technical recruiters have experience targeting the category. ISVs seem confident Motif talent can be replaced with little difficulty.
Several related consequences of Motif's long marketplace dominance make for a rich infrastructure. There are many books on Motif programming and use, and while there have been several magazines devoted to Motif programming, only one remains. Motif is changing sufficiently slowly now for readers to prefer authoritative books, with little need for the novel topics and treatments of magazines.
Motif programming's two greatest social advantages are the availability of friendly volunteers and third-party add-ons. Although the Usenet newsgroup comp.windows.x.motif's distribution volume is quite modest in comparison with Java or Windows newsgroups, it's generally of high quality. The newsgroup's authoritative FAQs (frequently asked questions) are remarkably complete. Kenton Lee, an independent consultant who maintains these technical documents online, is quite generous with his time and knowledge, both in newsgroups and private correspondence. He helps simplify individual practitioners' acculturation to Motif practices and resources.
For still more specific help, there's a wealth of third-party commercial offerings. Good training classes and support for Motif are available, as well as contracted development for specific projects. Most important are the dozens of shrink-wrapped libraries and frameworks offering specialized widget sets and Motif wrappers that multiply developers' productivity. This is the area in which Unix application development is most like Windows. Just as in the VBX market, several companies offer competing libraries to perform specialized two- or three-dimensional display, implement man-machine panels, and so on.
Some recurring issues in our own development work are portability, productivity, and internationalization. We'll first mention the latter.
In principle, Motif supports Unicode and provides enough programmatic flexibility to permit customization with regard to other localization requirements, including date and currency formatting. However, until recently, the Unicode capabilities had been tagged as fragmentary and difficult. Motif 2.1 includes Complex Text Language (CTL) support. CTL expresses Swing-like (Swing is the current GUI-toolkit standard for Java programming) capabilities, somewhat in the spirit of UIL. As Lee told us, "I think Motif's international language support is way ahead of the competition."
Motif is portable -- in a sense. Vendors bundle it not only for all the leading proprietary Unix varieties, but also for OpenVMS and a few other specialized OSs. High-quality ports are available from third parties for OS/400, LynxOS, Windows, and other OSs. There was not, to the best of our knowledge, an actively-supported Motif for MacOS before Mac X.
On the other hand, Motif's history is tied rather closely to that of Unix, and it feels a bit out of place even in good implementations like Focus's Nutcracker Motif for Windows NT. We know of few projects that use Motif as a standard for new development designed for both Unix and Windows.
One underpublicized portability Motif offers is between different languages, rather than between operating systems. The overwhelming majority of Motif development is coded in C and C++. As experienced as we are with C-oriented Motif programming, we strongly advocate more productive languages. Few people seem to realize that several other languages offer good Motif bindings.
Probably the most popular among these is dtksh (formerly wksh). The desktop Korn shell is a proprietary product bundled with Solaris, HP/UX, AIX, UnixWare, and Tru64 Unix. Among its distinctions is an award-winning book from Addison-Wesley that documents its use in development. dtksh efficiently supports GUI programming purely in the shell language, without reference to C.
It's a good choice for system administrators who want to build small control panels for recurring administrative chores, but aren't in a position to learn C well enough for conventional Motif programming. dtksh is not yet an open source product. However, since ksh93 is, and the licensing for Motif itself appears to be in transition, it is reasonable to speculate that change for dtksh is due.
For Java, Swing 1.1 includes a com.sun.java.swing.motif package which implements Motif L&F. There are also several third-party products that generate Java, including the Sun Workshop, which conforms to the Motif L&F. Integrated Computer Solutions, a vendor with considerable Motif experience, offers a different and rather complementary approach. Its Builder Xcessory is a mature GUI development tool that selectively generates UIL, C, Java, ViewKit (a proprietary C++ framework), or C++ source, and runs on most leading Unixes, including Linux.
TclMotif is an open source project that was quite capable, but has not been actively maintained for several years. Although it's at least superficially compatible with more recent releases of Motif, it's probably of most interest to experimenters. The executable is often called MOAT, the Motif, and Tcl binding.
This series will profile wxWindows, a toolkit that can target Motif, later in the year. There is a good Python binding, wxPython, which affords users of that language a convenient way to develop applications with the Motif L&F. There is also a binding directly to Motif that's much like MOAT, in that it was quite useful in the mid-'90s but has not been maintained.
Klm is a Motif binding to a Lisp dialect called Klone. It was also last updated in the mid-'90s.
So where is Motif now? To be blunt, it's been quite a while since we last recommended junior programmers learn Motif. Motif has a reputation for being clumsy, difficult, and old-fashioned. Liberalization of its license strikes several industry observers as the desperate act of a product clearly on the decline. Many of the most interesting Motif-based products seem to have stagnated since 1995. Most of the world has over-8-bit displays, and Linux-generation programmers seem to agree there's no compelling reason to start using Motif now.
On the other hand, the Open Group continues to innovate. CTL is an impressive achievement. The tradition of professionalism among third-party suppliers and cooperation among developers is a great advantage. Insiders assure us that Open Group licenses are on track for further liberalization in the next year. Motif is sufficiently flexible for almost any sort of GUI development. If you or your clients already have a stake in Motif, watch comp.windows.x.motif, subscribe to the LessTif mailing list, and keep an eye on motifzone.net. The year ahead looks to be an eventful one for Motif.