Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Building portable C++ applications with YACL
Sridhar M., Addison-Wesley Longman Publishing Co., Inc., Boston, MA, 1996. Type: Book (9780201832761)
Date Reviewed: Mar 1 1997

YACL (Yet Another Class Library) is a C++ library intended to reduce the amount of time taken to develop portable applications, including interactive programs with graphical user interfaces (GUIs). The cover of the book states that YACL presents a single high-level programming interface, has complete platform independence of public class interfaces, and maximizes the reusability of the classes. One of the main goals of the book is to demonstrate these features, along with the use of the library.

The first two parts of the book present a tutorial introduction to YACL, and the third is a reference manual for the library. A detailed table of contents and index cover the first two parts. The typography is clean, and the book is well laid out. The reader is expected to have some experience designing and writing applications in C++, including at least a few classes. Knowledge of Smalltalk would also help in understanding the design and use of YACL, which draws heavily from the Smalltalk class hierarchy. A strong emphasis is placed on practicality and usability, with straightforward solutions to common problems.

The first part of the book introduces the “base classes,” which form a set of general-purpose abstractions intended to aid in the development of any application. The elementary classes include strings, integers, dates, times, byte strings, and byte arrays. Template container classes allowing aggregations of YACL objects include sequences, sets, maps, n-ary trees, and B-trees. The latter come in a variety of flavors, allowing both in-memory and disk-based storage. A separate BitSet represents sets of integers over a given range. For the most part, the text and sample code combine to provide an easy-to-understand introduction to the design, implementation, and use of the classes.

The second part of the book explores the requirements for a portable GUI library and presents a set of concrete classes designed to meet these requirements. Programmatically, a GUI application is viewed as a hierarchy of nested view objects, which are built upon the base classes. A restricted variant of the Smalltalk model-view-controller paradigm is used to manage control and rendering of the various data (models) maintained in the program. A single controller object interfaces with the underlying window system and hides much of the detail. Specific visual objects include buttons, menus, labels, and editors. These can be grouped in various ways to produce dialogue boxes and button groups. A GraphicObject class and supporting infrastructure provide adequate support for drawing graphical objects on-screen, off-screen, and on printers. These objects include line segments, ellipses, rectangles, and the like in various colors. The GUI classes support Microsoft Windows 3.1 and NT, OS/2, and the Motif libraries for X.

Part 3 is a reference manual for the entire YACL library. It is well organized and includes a table of contents. There is an entry for each class in the library, identifying its superclasses and its interface, including a clear indication of which methods are virtual, and where, if anywhere, they are overridden. Each method is described clearly and concisely.

There are a few minor bugs in some of the examples in parts 1 and 2. In some instances, the stated output is incorrect, while in others, the actual interface of a class does not match the example code. The bugs in Part 1 are generally easy to spot and correct, while those in Part 2 are somewhat more troublesome. The reference manual proved invaluable for detecting bugs in the sample code as well as for writing small example programs to test various parts of the library.

A number of key goals guided the development of YACL, including ease of use, efficiency, portability, noninterference with the surrounding environment, minimization of hardwired limits, effective use of C++, native look and feel on each platform, and hooks to platform-specific functionality. This is a lofty set of goals involving a number of difficult issues, design decisions, and tradeoffs, many of which are highlighted and discussed throughout the tutorial.

I learned a great deal from the book and found it pleasant to read. Sridhar has done a fine job of design, implementation, and writing. However, I would be reluctant to base a major effort on YACL because it is nonstandard and does not have guaranteed support. If portability is an important concern, Java, which is probably easier to teach than C++, may be a better vehicle for new development. Similarly, learning the Standard Template Library, which has significant overlap with the YACL container classes, has advantages that cannot be ignored.

Reviewer:  James S. Uhl Review #: CR120110 (9703-0158)
Bookmark and Share
 
Software Libraries (D.2.2 ... )
 
 
C++ (D.3.2 ... )
 
 
Data Types And Structures (D.3.3 ... )
 
 
Portability (D.2.7 ... )
 
 
Virtual Device Interfaces (I.3.4 ... )
 
 
Windowing Systems (H.5.2 ... )
 
  more  
Would you recommend this review?
yes
no
Other reviews under "Software Libraries": Date
Mixed language programming
Einarsson B., Gentleman W. Software--Practice & Experience 14(4): 383-392, 1984. Type: Article
May 1 1985
Programming solutions handbook for IBM microcomputers
Sanchez J., Canton M., McGraw-Hill, Inc., New York, NY, 1991. Type: Book (9780070545977)
Sep 1 1992
Design of an Ada library of elementary functions with error handling
Corliss G. Journal of Pascal, Ada & Modula-2 6(3): 17-31, 1987. Type: Article
Jul 1 1988
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