Alexander writes: "Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution."
Resources on writing design patterns
What is a good design pattern?
A good pattern can be identified because:
- It solves a problem: Patterns capture solutions, not just abstract principles or strategies.
- It is a proven concept: Patterns capture solutions with a track record, not theories or speculation.
- The solution isn't obvious: Many problem-solving
techniques try to derive
solutions from first principles. The best patterns generate a solution to a problem indirectly--a necessary approach for the most difficult problems of design.
- It describes a relationship: Patterns don't just describe modules, but describe deeper system structures and mechanisms.
- The pattern has a significant human component (minimize human intervention). The best patterns explicitly appeal to aesthetics and utility.
A pattern language for pattern writing: