Adding patterns
Tom feels pretty good about his first pass. He has enough to spark some serious discussion about how to structure the project. This is the objective of the first pass. Tom makes a quick list of all the patterns Kitty and Phoebe had used in the bicycle project, as follows:
- Creational patterns:
- Factory pattern
- Abstract Factory pattern
- Factory method
- Builder
- Object pool
- Singleton
- Structural patterns:
- Decorator
- Façade
- Composite
- Bridge
- Behavioral patterns:
- Command
- Iterator
- Observer
- Strategy
Tom begins to focus on the diagram and sets to thinking about the application of each pattern. One by one he looks for opportunities. Some of them are obvious. Some of them may not be needed. Tom’s diagram doesn’t currently include any changes to the bicycle factory’s robotics. For the most part, the robotics classes should not be tightly coupled to making bicycles. After a few hours of personal debate and much consideration, Tom is prepared to discuss...