Object-Oriented Design Heuristics (paperback), 1st edition

  • Arthur J. Riel

Unfortunately, this item is not available in your country.


Upon completion of an object-oriented design, you are faced with a troubling question: "Is it good, bad, or somewhere in between?" Seasoned experts often answer this question by subjecting the design to a subconscious list of guidelines based on their years of experience. Experienced developer Arthur J. Riel has captured this elusive, subconscious list, and in doing so, has provided a set of metrics that help determine the quality of object-oriented models.

Object-Oriented Design Heuristics offers insight into object-oriented design improvement. The more than sixty guidelines presented in this book are language-independent and allow you to rate the integrity of a software design. The heuristics are not written as hard and fast rules; they are meant to serve as warning mechanisms which allow the flexibility of ignoring the heuristic as necessary. This tutorial-based approach, born out of the author's extensive experience developing software, teaching thousands of students, and critiquing designs in a variety of domains, allows you to apply the guidelines in a personalized manner.

The heuristics cover important topics ranging from classes and objects (with emphasis on their relationships including association, uses, containment, and both single and multiple inheritance) to physical object-oriented design. You will gain an understanding of the synergy that exists between design heuristics and the popular concept of design patterns; heuristics can highlight a problem in one facet of a design while patterns can provide the solution.

Programmers of all levels will find value in this book. The newcomer will discover a fast track to understanding the concepts of object-oriented programming. At the same time, experienced programmers seeking to strengthen their object-oriented development efforts will appreciate the insightful analysis. In short, with Object-Oriented Design Heuristics as your guide, you have the tools to become a better software developer.


Table of contents



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.


A. Heuristics Summary.

B. Memory Leakage in C++.

C. Selected C++ Examples.


Index. 020163385XT04062001

Published by Addison-Wesley Professional (April 30th 1996) - Copyright © 1996