9.1 Introduction to Object-Oriented Design


 

The ability to design an object-oriented system is simultaneously the most important skill for a software developer to possess and the most elusive to learn. Design skill is important because a system's design determines to what extent the system realizes crucial software-engineering principles such as separation, encapsulation, information hiding and key design goals such as abstraction and generalization. The skill of good object-oriented design is elusive because, like all design activities, it cannot be reduced to a mechanical process. Good designers bring to their task both native ability that emerges as insight and inspiration, and experience gained through practicing the art of object-oriented design on numerous software projects. While insight, inspiration, and experience cannot be articulated, the heuristic rules and guidelines that characterize a good design may be elicited for study.

The best way to develop design skill is to design systems using the techniques, representations, and patterns that have been developed by and are used by experienced designers. Design techniques are collections of strategies, questions, approaches, and rules that help to generate and shape ideas that lead to a good design. In this chapter, techniques are described for designing an individual class by analyzing a system's specification, a class-inheritance hierarchy from a collection of individual classes, and an extensible-object structure to cope with complex logic.

Design representations are graphical, semi formal notations and diagrams that effectively communicate the critical aspects of a design structure. These representations are useful in that they externalize a designer's ideas so that they can be subject to analysis, evaluation, and comparison with alterrnative designs, act as a blueprint for those implementing the design, and document the final design for those performing later maintenance and extension. Design representations are described in this chapter for classes and class hierarchies, object structures, and object interactions.

Students of object-oriented design should study the artifacts (designs) produced by good designers in much the same way that art students study the great masters, architecture students study famous structures and buildings, and writing students study the classics in literature. For students of object-oriented design, the notion of a design pattern has recently emerged and allows great (or at least commnly needed and fundamental) designs to be studied.

Although these three elements of design - techniques, representations, and patterns - are described independently, their practical use must be integrated. Also, the material presented here is only a small part of what is known about object-oriented design: there are numrous design techniques, different representations, and a growing catalog of patterns.




©1998 Prentice-Hall, Inc.
A Simon & Schuster Company
Upper Saddle River, New Jersey 07458

Legal Statement