November 93 - Booch Components
Booch Components
Scott L. Taylor
Many of you may have heard that Bedrock is going to use a subset of the Booch
Components and are wondering what the Booch Components have to offer. This article
gives an overview of what the Booch Components are, compares them to other
frameworks and discusses some of the issues associated with integrating and using
them with existing frameworks.
The Booch Components are a robust and complete structures and tools class library
that provide fundamental data structures and algorithms used in large scale application
development. The Booch Components represent a specialized framework in terms of
functionality, but at the same time they are a very generalized and flexible
framework. The developer can override any of the components and use the mixin
inheritance design aspects of the library to build completely new components with new
functionality that are tuned for any particular requirement. The Booch Components
package consists of 300 files with almost 300 template based classes and some 3000
methods.
The Booch Components take up where MacApp left off. They are a platform independent
reusable collection of C++ classes published by Rational and have been designed from
the start with performance in mind. They are a second generation class library that
take advantage of many of the new C++ features that are now becoming available in
C++ compilers like templates and exception handling. The Booch Components
structures included in the class library are as follows: Bags, Deques, Graphs, Lists,
Maps, Queues, Rings, Sets, Stacks, Trees and Strings. The tools included are Filters,
Pattern Matching, Searching, Sorting and Utilities. The Booch Components offer many
more types of structures and tools than frameworks like MacApp or TCL and the they
are much more flexible in terms of runtime performance and memory utilization.
A brief description of these structures and tools will be given later. It is obvious from
the assortment of components available that an application developer can easily find a
suitable structure for a given job. The Booch Components are based heavily on
templates which allow a structure to provide type safety for the items contained in the
structure. The Booch Components also allow the application programmer to choose
different forms of each structure or tool based on the requirements of its use. Not only
does the developer have a wide selection of components to choose from, but he or she
also has a selection of different forms of the component that provide different
time/space tradeoffs. The Booch Components are very customizable and use multiple
inheritance to derive structures that have a common public interface but completely
different implementations. This concept is used to provide different memory
management schemes and different methods of process synchronization for each
structure.
Anyone who is familiar with an application framework, like MacApp, has come to know
and love the power and flexibility of classes derived from TDynamicArray like TList,
and TSortedList. And anyone that has written a substantial application in MacApp has
also soon realized that these structure classes are not the end all and be all.
After spending a little time with the Booch Components you will come to appreciate the
power of the components and at the same time the expressive power of the C++
language.
Booch Components Design
The Booch components represent a second generation object oriented design that
exploits many of the newer concepts in the C++ language. Because of this, the Booch
Components don't look like a typical framework. For instance, the components are
arranged as a forest of classes rather than a singly rooted tree of classes like MacApp
or TCL. This allows the developer to use only the components desired and avoids