Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Object-oriented programming with the X Window system toolkits
Smith J., John Wiley & Sons, Inc., New York, NY, 1991. Type: Book (9780471532590)
Date Reviewed: Oct 1 1994

The two primary objectives of this book, as specified by the author, are to present object-oriented aspects of Xt programming, and to provide a number of useful applications and widgets based on Xt intrinsics and the Athena widget set. This book is not intended as a textbook. Its audience includes professional programmers interested in examples of how to organize Xt widgets. It assumes a good knowledge of X terminology, Xlib functions, and Xt widget syntax and usage, in addition to reading knowledge of C and several UNIX utilities and concepts. To gauge the level of knowledge necessary for this book, an interested reader should examine the following list of terms that are used with little definition or explanation: callback routines, GC, X resources, pixmaps, widget, XtCreateManagedWidget(), XtSetArg(), and XtAddCallback().

The strength of this book is the extensive examples. They are presented with extensive annotations in the 17 chapters, and in a more compact form in the 21 appendices. The annotations describe the tradeoffs in the creation of various widgets. These annotations are valuable heuristic information for a knowledgeable X programmer or graphical user interface (GUI) designer who is prepared to go to a higher level of expertise. A moderate level of experience with X widgets is necessary to understand these tradeoffs and to learn the heuristics, however. This book is not for beginners in GUI programming with X.

The book can be divided into three major sections. The first chapter is an introduction and overview. Chapter 2 presents object-oriented programming (OOP) and its interaction with the X Window System, including Xt widgets as compared to C++ objects. Chapters 3 through 7 (the first major section) describe Xlib programming. Chapter 4 describes interface creation for Xlib applications. Chapter 5 is devoted to an example application--an X Window System hex-dump utility. The semantics and examples of self-contained event loops are the subject of chapter 6. Callback functions and their composition are covered in chapter 7.

The second major section focuses on Xt application programming. Chapter 8 presents an overview. Chapter 9 describes the process of creating high-level interfaces for Xt applications. Chapter 10 is devoted to a sample Xt application--a wastebasket application.

Xt widget programming is the subject of the third part. Chapter 11 is an overview. Chapter 12 describes and gives examples of simple widget design, while chapter 13 proceeds to more complex, compound widgets. Chapter 14 describes the design of an application that represents a high-level interface widget. In an analogous way, chapter 15 describes the design of low-level, non-command buttons. Chapter 16 does the same with a button-oriented selection box. Finally, chapter 17 gives examples of the use of Xi widget sets in an application.

Each of the 21 appendices contains the source code for an example application. These pages are followed by a two-page reference section and an index consisting primarily of Xt function names (with a few concepts).

The primary weakness of this book is its failure to achieve one of its goals: presenting object-oriented aspects of Xt programming. The author fails not from errors in the presentation but, more fundamentally, because of the lack of significant object orientation in X widgets. It is true that an Xt widget has some analogy to an object, but it is a stretch to say that Xt is object-oriented. Some important principles of software engineering can be used in programming Xt widgets, but they are not sufficient to be called object-oriented programming.

First, Xt widgets are generally created and used through the C programming language. Thus, they lack syntactic support for objects. An object is generally considered to be a collection of data and related operations whose internal details are hidden. A widget has some data and related operations, but these are not collected, and the implementation details are not hidden. A form of inheritance is described that is actually a careful use of composition of more specific widgets from more primitive widgets. Thus, programming in Xt is no more object-oriented than programming in C.

This book captures a wealth of practical experience in the creation and organization of Xt widgets by means of a useful set of annotated examples. Understanding and using this heuristic information requires a good base of practical experience in the use of X and C. Although the programming style described and used here cannot be described as object-oriented because of the lack of syntactic support in the underlying language, it does capture some useful and well-established software engineering principles.

Reviewer:  J. Kiper Review #: CR116655
Bookmark and Share
 
X-Window (D.2.2 ... )
 
 
Programmer Workbench (D.2.2 ... )
 
 
User Interfaces (D.2.2 ... )
 
 
Object-Oriented Programming (D.1.5 )
 
Would you recommend this review?
yes
no
Other reviews under "X-Window": Date
The joy of X
Mansfield N., Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1993. Type: Book (9780201565126)
Jan 1 1994
R5 update
Flanagan D. (ed), O’Reilly & Associates, Inc., Sebastopol, CA, 1991. Type: Book (9780937175866)
Aug 1 1992
The X Window System (Open Look ed.)
Young D. (ed), Pew J., Prentice-Hall, Inc., Upper Saddle River, NJ, 1992. Type: Book (9780139829925)
Jul 1 1993
more...

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