Apply the design pattern when the design is ready to accept it.
-
Don’t force a design pattern onto a problem. Let the code evolve until it’s obvious the design pattern is needed. It is better to be late than early.
-
This idea comes back to my thoughts on keep things simple don’t over architect code. Don’t add it, until it’s a requirement.
Multiple Iterations
- The first attempt is to produce the tailored design
- Design patterns do not fit into this phase
- Then refactor to reach a better design
- this is where design patterns fit well.
Design Patterns are generally more complex than they are in the examples and text books.