Table of Contents
Preface.
Acknowledgments.
1. The Motivation for Object-Oriented Programming.
Revolutionists, Evolutionists, and the Object-Oriented
Paradigm.
Accidental Versus Essential Complexity à
la Frederick Brooks.
The Waterfall Model.
The Iterative Model.
Same- Versus Different-Language Prototyping.
Software Reusability.
Corporate Hierarchies of Good Designers.
2. Classes and Objects: The Building Blocks of the Object-Oriented Paradigm.
Introduction to Classes and Object.
Messages and Methods.
Class Coupling and Cohesion.
Dynamic Semantics.
Abstract Classes.
Roles Versus Classes.
3. Topologies of Action-Oriented Versus Object-Oriented Applications.
Differences in Application Topologies.
When the Action-Oriented Paradigm Goes Right.
The God Class Problem (Behavioral Form).
Another Example of Poor System Intelligence
Distribution.
The God Class Problem (Data Form).
The Proliferation of Classes Problem.
The Role of Agent Classes.
Examining the Use of Separate Entity and
Controller Classes.
4. The Relationships Between Classes and Objects.
Introduction to Class and Object Relationships.
The Uses Relationship.
Six Different Ways to Implement the Uses
Relationship.
Heuristics for the Uses Relationship.
Refining the Amount of Collaboration Between
Two Classes.
The Containment Relationship.
Semantic Constraints Between Classes.
Attributes Versus Contained Classes.
More Containment Heuristics.
A Relationship Between Uses and Containment?
Containment by Value Versus Containment by
Reference.
5. The Inheritance Relationship.
Introduction to the Inheritance Relationship.
Overriding Base Class Methods in Derived
Classes.
The Use of the Protected Section of a Base
Class.
The Width and Depth of Inheritance Hierarchies.
Private, Protected, and Public Inheritance
à la C++.
A Real-World Example of Specialization.
Heuristics That Trade Off Design Complexity
and Flexibility.
A Real-World Example of Generalization.
The Mechanism of Polymorphism.
A Problem with the Use of Inheritance as
a Reusability Mechanism.
An Inheritance Solution to an Interrupt-Driven
Architecture.
Inheritance Hierarchies Versus Attributes.
The Confusion of the Need for Inheritance
Versus an Object's Dynamic Semantics.
Using Inheritance to Hide the Representation
of a Class.
Mistaking Objects for Derived Classes.
Mistaking Object Generalization for the Need
to Build Classes at Runtime.
The Attempt to NOP a Base Class Method in
Its DerivedClass(es).
The Implementation of Optional Parts of Objects.
A Problem with No Optimal Solution.
Reusing Components Versus Reusing Frameworks.
6. Multiple Inheritance.
Introduction to Multiple Inheritance.
The Common Misuse of Multiple Inheritance.
A Valid Use of Multiple Inheritance.
Accidental Complexity In Languages That Do
Not Support Multiple Inheritance.
Frameworks That Incorporate Multiple Inheritance.
The Use of Multiple Inheritance in the Design
of Mixins.
DAG Multiple Inheritance.
Accidental DAG Multiple Inheritance via Poor
Implementation of Optional Containment.
7. The Association Relationship.
Introduction to Associations.
Associations Implemented Through a Referential
Attribute.
Associations Implemented Through a Third-Party
Class.
Deciding Between a Containment and an Association
Relationship.
8. Class-Specific Data and Behavior.
Introduction to Class-Specific Versus Object-Specific
Data and Behavior.
Using Metaclasses to Capture Class-Specific
Data and Behavior.
Using Language-Level Keywords to Implement
Class- Versus Object-Specific Data and Behavior.
Metaclasses à la C++.
A Useful Abstract Class That Is Not a Base
Class?
9. Physical Object-Oriented Design.
The Role of Logical and Physical Object-Oriented
Design.
The Construction of Object-Oriented Wrappers.
Persistence in an Object-Oriented System.
Memory Management Issues in an Object-Oriented
Application.
Minimal Public Interfaces for Reusable Components.
Implementing Safe Shallow Copies.
Concurrent Object-Oriented Programming.
Implementing Object-Oriented Designs in Nonobject-Oriented
Languages.
10. The Relationship Between Heuristics and Patterns.
Heuristics Versus Patterns.
Transitivity Among Design Transformation
Patterns.
The Reflexive Property of Design Transformation
Patterns.
Other Design Transformation Patterns.
Future Research.
11. The Use of Heuristics in Object-Oriented Design.
The ATM Problem.
Choosing a Methodology.
A First Attempt at Producing an Object Model
for the ATM.
Adding Behavior to Our Object Model.
Explicit Case Analysis Due to Accidental
Complexity.
Messaging Objects in Different Address Spaces.
The Processing of the Transaction.
Returning to the Domain of the ATM.
Other Miscellaneous Issues.
Conclusion.
A. Heuristics Summary.
B. Memory Leakage in C++.
C. Selected C++ Examples.
Bibliography.
Index.
About the Author
Arthur J. Riel has more than twelve years of experience programming in
C and C++ and currently teaches more than forty courses per year in both
corporate and academic environments. He has participated in the development
of many large systems, working with AT&T Bell Laboratories, Draper Laboratories,
IBM, and Northeastern University. He has written numerous articles for publications
including the Journal of Object-Oriented Programming, the C++
Insider, and the C/C++ Gazette. He is also a frequent lecturer
at leading conferences including OOPSLA, Object Expo, SCOOP, and C++ World.