Design Patterns Explained – Annotated Table of Contents and Related Articles

Below is an annotated table of contents, summarizing each part and chapter, showing the topics covered, and listing articles that relate to the chapter.


Preface

This chapter provides a brief overview of the Unified Modeling Language (UML), the modeling language of the object-oriented community. If you do not already know the UML, this chapter gives you the minimal understanding you need to be able to read the diagrams contained in this book.

Topics Related Articles
  • From Object Orientation to Patterns to True Object Orientation
  • From Artificial Intelligence to Patterns to True Object Orientation
  • A Note About Conventions Used in This Book
  • Feedback
  • New in the Second Edition
  • Acknowledgements

top


Part I: An Introduction to Object-Oriented Software Development

This part introduces you to a method for developing object-oriented software that is based on patterns-the insights and best practices learned by designers and users over the years-and on the modeling language (UML) that supports this method.

Chapter 1. The Object-Oriented Paradigm

This chapter introduces you to the object-oriented paradigm by comparing and contrasting it with something familiar: standard structured programming.

Topics Related Articles
  • Overview
  • Before the Object-Oriented Paradigm: Functional Decomposition
  • The Problem of Requirements
  • Dealing with Changes: Using Functional Decomposition
  • Dealing with Changing Requirements
  • The Object-Oriented Paradigm
  • Object-Oriented Programming in Action
  • Special Object Methods
  • Summary
  • Review Questions

Chapter 2. The UML—The Unified Modeling Language

This chapter provides a brief overview of the Unified Modeling Language (UML), the modeling language of the object-oriented community. If you do not already know the UML, this chapter gives you the minimal understanding you need to be able to read the diagrams contained in this book.

Topics Articles
  • Overview
  • What Is the UML?
  • Why Use the UML?
  • The Class Diagram
  • Interaction Diagrams
  • Summary
  • Review Questions

top


Part II: The Limitations of Traditional Object-Oriented Design

In these chapters we solve a real world problem using standard object-oriented methods. In other words, we over rely on inheritance. This problem illustrates how easy it is to get trapped into a model which solves things by special casing everything. This is not a fabricated problem, but was a problem encountered by one of the authors when he was just learning to use design patterns.

Chapter 3. A Problem That Cries Out for Flexible Code

This chapter examines the CAD/CAM problem, the vocabulary of the domain, and important features of the problem. Because the CAD/CAM system continues to evolve, the problem cries out for flexible code.

Topics Related Articles
  • Overview
  • Extracting Information from a CAD/CAM System
  • Understand the Vocabulary
  • Describe the Problem
  • The Essential Challenges and Approaches
  • Summary
  • Review Questions

Chapter 4. A Standard Object-Oriented Solution

This chapter describes a solution based on object orientation. It is not a great solution, but it is a solution that would work.

Topics Related Articles

top


Part III: Design Patterns

This part introduces design patterns: what they are and how to use them. Several patterns pertinent to the CAD/CAM problem from Chapter 3 are described. They are presented individually and then related to the earlier problem. Throughout the pattern-learning chapters, I emphasize the object-oriented strategies espoused by the Gang of Four (as the authors Gamma, Helm, Johnson, and Vlissides are often referred to) in their seminal work, Design Patterns: Elements of Reusable Object-Oriented Software.

Chapter 5. An Introduction to Design Patterns

This chapter introduces the concept of design patterns. It discusses their origins in architecture and how they apply in the discipline of software design. It examines the motivations for studying design patterns.

Topics Related Articles
  • Overview
  • Design Patterns Arose from Architecture and Anthropology
  • Moving from Architectural to Software Design Patterns
  • Why Study Design Patterns?
  • Other Advantages to Studying Design Patterns
  • Summary
  • Review Questions

Chapter 6. The Facade Pattern

This chapter explains what the Facade pattern is and where it is used, the key features of the pattern, some variations on the pattern, and relates it to the CAD/CAM problem.

Topics Related Articles
  • Overview
  • Introducing the Facade Pattern
  • Learning the Facade Pattern
  • Field Notes: The Facade Pattern
  • Relating the Facade Pattern to the CAD/CAM Problem
  • Summary
  • Review Questions

Chapter 7.The Adapter Pattern

This chapter continues the study of design patterns with the Adapter pattern. This chapter explains the key features of this common pattern, uses it to illustrate polymorphism, includes a comparison of it to the Facade pattern, and relates it to the CAD/CAM problem.

Topics Related Articles
  • Overview
  • Introducing the Adapter Pattern
  • Learning the Adapter Pattern
  • Field Notes: The Adapter Pattern
  • Relating the Adapter Pattern to the CAD/CAM Problem
  • Summary
  • Review Questions

Chapter 8. Expanding Our Horizons

Many people learned object-oriented with definitions that are actually fairly limiting. This chapter introduces more powerful perspectives in looking at polymorphism, abstraction, classes and encapsulation. This new perspective is essential to truly understanding design patterns. It uses what has been learned in Chapters 5 through 7.

Topics Related Articles
  • Overview
  • Objects: the Traditional View and the New View
  • Encapsulation: the Traditional View and the New View
  • Find What Is Varying and Encapsulate It
  • Commonality and Variability Analysis and Abstract Classes
  • The Qualities of Agile Coding
  • Summary
  • Review Questions

Chapter 9. The Strategy Pattern

This chapter introduces a new case study, which comes from the area of e-commerce (electronic commerce over the Internet). It also begins a solution using the Strategy pattern.

Topics Related Articles
  • Overview
  • An Approach to Handling New Requirements
  • The International E-Commerce System Case Study: Initial Requirements
  • Handling New Requirements
  • The Strategy Pattern
  • Field Notes: Using the Strategy Pattern
  • Summary
  • Review Questions

Chapter 10. The Bridge Pattern

This chapter continues the discussion of design patterns with the Bridge pattern. The Bridge pattern is quite a bit more complex than the other patterns explored heretofore. It is also much more useful. Therefore, this chapter provides detail on how to learn this pattern including key features, an example on how to derive it, and observations from practice.

Topics Related Articles
  • Overview
  • Introducing the Bridge Pattern
  • Learning the Bridge Pattern: An Example
  • An Observation About Using Design Patterns
  • Learning the Bridge Pattern: Deriving It
  • The Bridge Pattern in Retrospect
  • Field Notes: Using the Bridge Pattern
  • Summary
  • Review Questions

Chapter 11. The Abstract Factory Pattern

The pattern that can be used to control the creation of families of objects is presented, with key features, an example to help derive it, and relates it to the CAD/CAM problem.

Topics Related Articles
  • Overview
  • Introducing the Abstract Factory Pattern
  • Learning the Abstract Factory Pattern: An Example
  • Learning the Abstract Factory Pattern: Implementing It
  • Field Notes: The Abstract Factory Pattern
  • Relating the Abstract Factory Pattern to the CAD/CAM Problem
  • Summary
  • Review Questions

top


Part IV: Putting It All Together: Thinking in Patterns

In this part, an approach is proposed to designing object-oriented systems based on patterns, which has been proven in real design practice. This approach first tries to understand the context in which objects show up. The approach is applied to the CAD/CAM problem.

Chapter 12. How Do Experts Design?

Alternate between the big picture and the specific details. Design patterns give us a way to focus on relationships between our objects. Christopher Alexander’s design methods give us clues in how to use design patterns conceptually. Thinking in terms of patterns instead of the classes.

Topics Related Articles

Chapter 13. Solving Our CAD/CAM Problem with Design Patterns

In this chapter, Alexander’s hypothesized approach with design patterns is applied to solve the CAD/CAM problem presented in Chapter 3, “A Problem That Cries Out for Flexible Code.”

Topics Related Articles
  • Overview
  • Review of the CAD/CAM Problem
  • Thinking in Patterns
  • Thinking in Patterns: Step 1
  • Thinking in Patterns: Step 2a
  • Thinking in Patterns: Step 2b
  • Thinking in Patterns: Step 2c
  • Thinking in Patterns: Steps 2a and 2b Repeated (Facade
  • Thinking in Patterns: Steps 2a and 2b Repeated (Adapter)
  • Thinking in Patterns: Steps 2a and 2b Repeated (Abstract Factory)
  • Thinking in Patterns: Step 3
  • Comparison with the Previous Solution
  • Summary
  • Review Questions

top


Part V: Toward a New Paradigm of Design

Although patterns are useful in their own right, the lessons learned from them can be used to create a different approach to designing application architectures from one that focuses on specialization or identifying the nouns and verbs of the problem domain. In this part, ways are discussed to design application architectures based on the lessons learned from design patterns.

Chapter 14. The Principles and Strategies of Design Patterns

Having learned several design patterns and seeing how they work together, we now step back and look at how what we have just learned illustrates common principles of design.

Topics Related Articles
  • Overview
  • The Open-Closed Principle
  • The Principle of Designing from Context
  • The Principle of Encapsulating Variation
  • Abstract Classes vs. Interfaces
  • The Principle of Healthy Skepticism
  • Summary
  • Review Questions

Chapter 15. Commonality and Variability Analysis

This chapter shows how to use commonality and variability analysis (CVA) to develop a high-level application design. Although design patterns can’t be used in all designs, the lessons learned from them can.

Topics Related Articles
  • Overview
  • Commonality and Variability Analysis and Application Design
  • Solving the CAD/CAM Problem with CVA
  • Summary
  • Review Questions

Chapter 16. The Analysis Matrix

This chapter continues the e-commerce case study discussed earlier in Chapter 9, “The Strategy Pattern.” It then steps back to look at one of the biggest problems in software development: handling variation within the problem domain. Design patterns can help analysts identify and organize variations successfully.

Topics Related Articles
  • Overview
  • In the Real World: Variations
  • The International E-Commerce System Case Study: Handling Variation
  • Field Notes
  • Summary
  • Review Questions

Chapter 17. The Decorator Pattern

This chapter continues the e-commerce case study introduced in Chapter 9, “The Strategy Pattern,” by describing a new requirement for the case study and showing how the Decorator pattern can handle the requirement flexibly. Also discussed are key features of the Decorator pattern, experiences of real world practice, and how it can be used to handle input/output.

Topics Related Articles
  • Overview
  • A little More Detail
  • The Decorator Pattern
  • Applying the Decorator Pattern to the Case Study
  • Another Example: Input/Output
  • Field Notes: Using the Decorator Pattern
  • The Essence of the Decorator Pattern
  • Summary
  • Review Questions

top


Part VI: Other Values of Patterns

This part extends the notion of patterns containing variation by illustrating different types of variation that can occur besides functionality.

Chapter 18. The Observer Pattern

This chapter introduces the categorization scheme of patterns, describes key features of and experiences in using the Observer pattern, and applies the Observer pattern to additional requirements for the e-commerce case study.

Topics Related Articles
  • Overview
  • Categories of Patterns
  • More Requirements for the International E-Commerce Case Study
  • The Observer Pattern
  • Applying the Observer to the Case Study
  • Field Notes: Using the Observer Pattern
  • Summary
  • Review Questions

Chapter 19. The Template Method Pattern

This chapter introduces the Template Method pattern by revealing its intent, describing its features, exploring how it can eliminate redundancy, sharing how it has been used in real world practice, and has it tackle additional requirements for the e-commerce case study.

Topics Related Articles
  • Overview
  • More Requirements for the International E-Commerce Case Study
  • The Template Method Pattern
  • Applying the Template Method to the International E-Commerce Case Study
  • Using the Template Method Pattern to Reduce Redundancy
  • Field Notes: Using the Template Method Pattern
  • Summary
  • Review Questions

top


Part VII: Factories

Factory patterns help with the creation of objects. But that may not be their most important use. Seen from the new perspective, this part shows how they are much more.

Chapter 20. Lessons from Design Patterns: Factories

Disclosed is how following the principles and practices of patterns implies we have to separate the use of objects from the construction/management of objects, hence factories.

Topics Related Articles
  • Overview
  • Factories
  • The Universal Context Revisited
  • Factories Follow Our Guidelines
  • Limiting the Vectors of Change
  • Another Way to Think About It
  • Different Roles of Factories
  • Field Notes
  • Summary
  • Review Questions

Chapter 21. The Singleton Pattern and the Double-Checked Locking Pattern

A couple of simple factories are portrayed that ensure only one object of a type exists.

Topics Related Articles
  • Overview
  • Introducing the Singleton Pattern
  • Applying the Singleton Pattern to the Case Study
  • A Variant: The Double-Checked Locking Pattern
  • Reflections
  • Field Notes: Using the Singleton and Double-Checked Locking Patterns
  • Summary
  • Review Questions

Chapter 22. The Object Pool Pattern

A past project is related in which the Object-Pool pattern was derived from the practices learned from patterns. This example also illustrates how the knowledge of patterns facilitates agile practices.

Topics Related Articles
  • Overview
  • A Problem Requiring the Management of Objects
  • The Object Pool Pattern
  • Observation: Factories Can Do Much More Than Instantiation
  • Summary
  • Review Questions

Chapter 23. The Factory Method Pattern

It is illustrated how the Factory Method pattern is useful for coordinating two interrelated class hierarchies.

Topics Related Articles
  • Overview
  • More Requirements for the Case Study
  • The Factory Method Pattern
  • Factory Method Pattern and Object-Oriented Languages
  • Field Notes: Using the Factory Method Pattern
  • Summary
  • Review Questions

Chapter 24. Summary of Factories

The use of object factory/managers set forth in this section are summarized.

Topics Related Articles
  • Overview
  • Steps in the Software Process
  • Parallels in Factories and XP Practices
  • Scaling Systems
  • Review Questions

top


Part VIII: Endings and Beginnings

This part continues with the new perspective on object-oriented design. In particular, this part describes how design patterns use this perspective in their design and implementation.

Chapter 25. Design Patterns Reviewed: A Summation and a Beginning

Looks at the motivations and relationships of design patterns within the context of this new perspective on object-oriented design.

Topics Related Articles
  • Overview
  • A Summary of Object-Oriented Principles
  • How Design Patterns Encapsulate Implementations
  • Commonality and Variability Analysis and Design Patterns
  • Decomposing a Problem Domain into Responsibilities
  • Patterns and Contextual Design
  • Relationships Within a Pattern
  • Design Patterns and Agile Coding Practices
  • Field Notes
  • Summary
  • Review Questions

Chapter 26. Bibliography

Suggests books and other resources for future study

Topics Related Articles
  • Design Patterns Explained: The Web Site Companion
  • Recommended Reading
  • Recommended Reading for Java Programmers
  • Recommended Reading for C++ Programmers
  • Recommended Reading for COBOL Programmers
  • Recommended Reading on eXtreme Programming
  • Recommended Reading on General Programming
  • Personal Favorites