Design pattern
The common definition of a pattern: “A solution to a problem in a context.”
What is a Pattern?
- Current use comes from the work of the architect Christopher Alexander
- Alexander studied ways to improve the process of designing buildings and urban areas
- “Each pattern is a three-part rule, which expresses a relation
between a certain context, a problem and a solution.” - Patterns can be applied to many different areas of human
endeavor, including software development
Why Patterns?
- "Designing object-oriented software is hard and designing
reusable object-oriented software is even harder." - Erich Gamma - Experienced designers reuse solutions that have worked in the
past - Well-structured object-oriented systems have recurring patterns of
classes and objects - Knowledge of the patterns that have worked in the past allows a
designer to be more productive and the resulting designs to be
more flexible and reusable
Types Of Software Patterns
- Riehle and Zullighoven in “Understanding and Using Patterns in
Software Development” mention three types of software patterns - Conceptual Pattern
- Pattern whose form is described by means of terms and concepts from the application domain
- Design Pattern
- Pattern whose form is described by means of software design constructs, such as objects, classes, inheritance and aggregation
- Programming Pattern (Programming Idiom)
- Pattern whose form is described by means of programming language
constructs
Benefits Of Design Patterns
- Capture expertise and make it accessible to non-experts in a
standard form - Facilitate communication among developers by providing a
common language - Make it easier to reuse successful designs and avoid alternatives
that diminish reusability - Facilitate design modifications
- Improve design documentation
- Improve design understandability
