What is a Pattern ?
Definition : "A solution to a problem in a context"
What are Design Patterns ?
- A design pattern is a standard solution to a common programming problem.
- These are like standard tools in your toolbox. When programmer see a common problem, he or she can look at their collection of design patterns and decide whether one fits the situation or not.
Types Of Software Patterns
1. Conceptual Pattern
Pattern whose form is described by means of terms and concepts from the application domain
2. Design Pattern
Pattern whose form is described by means of software design constructs, such as objects, classes, inheritance and aggregation
3. Programming Pattern
Pattern whose form is described by means of programming language constructs
Design Pattern Levels Of Abstraction
- Complex design for an entire application or subsystem (More Abtstract)
- Solution to a general design problem in a particular context (Middle Level)
- Simple reusable design class such as a linked list, hash table, etc. (More Concrete)
Classification Of Design Patterns
1. Purpose - what a pattern does
- Creational Patterns - Concern the process of object creation
- Structural Patterns - Deal with the composition of classes and objects
- Behavioral Patterns - Deal with the interaction of classes and objects
2. Scope - what the pattern applies to
- Class Patterns - Focus on the relationships between classes and their sub classes Involve inheritance reuse
- Object Patterns - Focus on the relationships between objects Involve composition reuse
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, documentation and understandability
No comments:
Post a Comment