Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Building OSF/Motif applications
Sebern M., Prentice-Hall, Inc., Upper Saddle River, NJ, 1994. Type: Book (9780131224094)
Date Reviewed: Dec 1 1995

The best way to learn a programming language or system is by starting with someone else’s working code. With a system as complex as Motif, in which a substantial amount of boilerplate is needed for even the simplest task, this is especially true. This book provides a huge amount of example code, implementing a complete Motif application and demonstrating many functions. Of the 717 pages, 193 (about one quarter) are the program listings for the complete application--a slide editor. Of the other three-quarters, a substantial amount is given to code listings demonstrating various parts of Motif. The code seems complete, polished, and professional. Comments are liberally scattered through the code, and it is clear that the author spent a good deal of time crafting the program for presentation to the reader.

This book is intended for the Motif and X Windows toolkit novice, and would certainly give such readers a good deal of sample code for use in beginning their experiments with Motif. It shows the basic workings of the Motif toolkit and user interface library (UIL). It does this both by presenting a series of small programs and program fragments and by incorporating the code into the larger finished application in stages. The examples are succinct and clear. They show how to use the UIL to construct an application, why the UIL is a preferred method of application building, and how to incorporate it into your application code. The examples cover resource management, callbacks, pop-up menus, widget management, work routines, and simple Xlib graphics operations. The coverage is complete, at least for the basic aspects of Motif programming.

The first section, “Introduction to OSF/MOTIF,” contains chapters on the principles of Motif and widgets as the building blocks of Motif.

In Section 2, “Building an Application,” the example application is built in stages. The first chapter in this section describes the intended application, and the second builds a skeleton application--essentially a window with a menu. Each subsequent chapter adds something to the application, with a focus on one type of interaction. For example, one chapter deals with pixmaps and their display, one with resource management, and so on. The order of presentation is natural and flows nicely. This section also contains a number of helpful and instructive programming tips intended to highlight common traps and pitfalls. Illustrations of the displays produced by the program are included.

For those without manuals, fundamental reference information on the Motif and X functions used is presented in the next section. This information is useful and well presented, but seems superfluous, since a serious Motif programmer will need the manuals.

The source code for the application is presented completely in Appendix A, including the UIL code, an application resource file, and the textual form of the bitmaps used. Other appendices give information on system-specific requirements for compilation and other sources of information about X and Motif.

The index is complete and well laid out. It does have the common X problem that many items are indexed under “X.” For the most part, the book is well laid out in reasonable-sized and well-focused sections. In many places, however, the typography detracts from the presentation. The programming tips are intrusive, oddly laid out, and spotty in style. The program text is in a monospaced typewriter font, which is hard to read. This difficulty is not helped by the frequent inclusion of lengthy comments in the code itself. To make matters worse, these comments are presented in the same typeface as the program, which makes it difficult to scan the listings for commentary. These comments would be better placed in the text, or at least in a contrasting font to make them more visible.

I found the sheer quantity of code to be more than a little intimidating. I do not find reading code easy or, for the most part, instructive. I would rather see more explanations and shorter but more precise code fragments illustrating specific aspects of the problem, supplemented with expository text and diagrams. I would also prefer that the code be available online or in other machine-readable form. It is hard to see any reader, however motivated, typing in the several hundred pages of program text from the book in order to begin experimenting with Motif. In fact, the sheer volume of code included was sufficiently intimidating that after only a chapter or two, I stopped reading it in detail, and after another chapter or two, I stopped even scanning it.

Reviewer:  Jeffrey Putnam Review #: CR118169
Bookmark and Share
  Featured Reviewer  
 
Osf/ Motif (D.2.2 ... )
 
 
X-Window (D.2.2 ... )
 
Would you recommend this review?
yes
no

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy