Design Patterns
Standardized, reusable descriptions that document proven ways to solve recurring design problems within a specific domain of expertise.
Key Points
- Capture proven solutions to common, repeatable design challenges.
- Create a shared vocabulary that improves communication across the team.
- Guide design choices without prescribing exact code or implementation.
- Encourage reuse and consistency, but must be adapted to context and constraints.
Example
In an agile e-commerce project, the team adopts the Strategy pattern to switch between different discount calculation rules by market. This keeps classes small, enables quick iteration on pricing experiments, and simplifies unit testing without rewriting core checkout code.
PMP Example Question
A Scrum team is considering the Strategy pattern to handle multiple pricing algorithms. What is the primary benefit of using a design pattern in this situation?
- It guarantees faster performance for all features.
- It offers a reusable, documented solution to a recurring design problem.
- It removes the need for architecture decisions.
- It ensures full compliance with all coding standards.
Correct Answer: B - Reusable, documented solution to a recurring design problem
Explanation: Design patterns formalize proven approaches to common design issues, improving clarity and reuse, but they do not guarantee performance, eliminate architectural thinking, or ensure compliance by themselves.
HKSM