What is Design Patterns?
Is a general reusable solution to a commonly occurring problem in software design. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects.
History
Patterns originated as an architectural concept by Christopher Alexander (1977/79). In 1987, Kent Beck and Ward Cunningham began experimenting with the idea of applying patterns to programming.Presented their results at the OOPSLA conference that year. In the following years, Beck, Cunningham and others followed up on this work.
Design patterns gained popularity in computer science after the book Design Patterns: Elements of Reusable Object Oriented Software was published in 1994.
Design patterns were introduced to the software community by
GoF or Gang of Four:
- Erich Gamma
- Richard Helm
- Ralph Johnson
- John Vlissides
Why Use Design Patterns?
Aren’t structural programming good enough?
Aren’t functions are good enough?
Design Patterns are beneficial in regards of:
- Maintenance
- Documentation
- Readability
- Easy when developing in large development teams
- Developing Code to be used by other then yourself
System Requirements
- No specific tools are needed to use Design Patterns.
- It would probably be object-oriented language of choice.
- Language features such as polymorphism, inheritance, classes, and objects.
Design patterns are group in three categories Creational Patterns, Structural Patterns and Behavioral Patterns.
Creational design patterns – are design patterns that deal with object-creational patterns and class-creational patterns, and is all about class instantiation.
- Factory Pattern
- Abstract Factory Pattern
- Builder Pattern
- Prototype Pattern
- Singleton Pattern
Structural design patterns – are design patterns that ease the design by identifying a simple way to realize relationships between entities.
- Adapter Pattern
- Bridge Pattern
- Composite Pattern
- Decorator Pattern
- Facade Pattern
- Flyweight Pattern
- Proxy Pattern
Behavioral design patterns – Are those patterns that are most specifically concerned with communication between objects.
- Observer Pattern
- Mediator Pattern
- Chain of Responsibility Pattern
- Template Pattern
- Interpreter Pattern
- Strategy Pattern
- Visitor Pattern
- State Pattern
- Command Pattern
- Iterator Pattern