Design
patterns provide the solution to software design problems which is evolved from
the object oriented programming. Basically design patterns are the reusable of
the design and the object.
Implementing
design patterns in our applications are proven and tested. Writing the code and
aligning with design patterns will make our applications very Reliable,
Scalable and Maintainable.
What
are the Design Patterns
Design
patterns is a reusable solution for the design and the object interaction for
the problems that occur repeatedly in application development. It’s basically a
template or you can say description for how to solve problems that can be reusable
or we can say we can use it in many situations.
Gang
of four (Gof) are
those who brought the concept of design pattern. According to them design
patterns is “Elements of reusable Object-Oriented
software “ .
Gang of Four
has divided the book into two parts with first part explaining about the pros
and cons of object oriented programming and the second part describes the
evolution of 23 classic software design patterns.
For more details, please refer to the following wikipedia article
https://en.wikipedia.org/wiki/Design_Patterns
For more details, please refer to the following wikipedia article
https://en.wikipedia.org/wiki/Design_Patterns
Types of Design Patterns
Gang of Four have categorised the design patterns in to 3 types based on different problems encountered in the real world applications. They are Creational, Structural and Behavioural.
Gang of Four have categorised the design patterns in to 3 types based on different problems encountered in the real world applications. They are Creational, Structural and Behavioural.
Creational
Design Pattern
These patterns deal with object creation and initialization.
Creational pattern gives the program more flexibility in deciding which objects
need to be created for a given case.
- Singleton
- Factory Method
- Abstract
Factory
- Builder
- Prototype
Structural
Design Patterns
This pattern deals with class and object composition. In
simple words, This pattern focuses on decoupling interface, implementation of
classes and its objects.
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
Behavioral
Design Patterns
These patterns deal with communication between Classes and
objects. `
- Chain
of Responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Visitor
- Template
Method
EmoticonEmoticon