Design patterns are optimized, reusable solutions to the
comman occouring problems in programming that we encounter every day. It’s not
language-specific . Most importantly, any design pattern can be a double-edged
sword— if implemented in the wrong place, it can be disastrous and create many
problems for you. However, implemented in the right place, at the right time,
it can be your savior.
A design
pattern is not a class or a library that we can simply plug into our system;
it’s much more than that. It is a template that has to be implemented in the
correct situation.
There are three basic kinds of design patterns:
- structural
- creational
- behavioral
Structural patterns
generally deal with relationships between entities, making it easier for these
entities to work together.
Creational patterns provide
instantiation mechanisms, making it easier to create objects in a way that
suits the situation.
Behavioral patterns are
used in communications between entities and make it easier and more flexible
for these entities to communicate.
Further Reading:
No comments:
Post a Comment