From wikipedia :
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
I always wanted to write all well-known design patterns into one repository with details and own examples. I think that my blog and github (all sources will be avaible on github) is comfortable for it.
So, every Saturday I'll be write a post about exactly one design pattern.
In this post, I want to group the design patterns into the categories.
Historically, design patterns were grouped into : creational patterns, structural patterns, and behavioral patterns.
From each group I chose only most popular and well-known patterns.
The creational design patterns deals with creation of objects in a manner suitable to the situation. Sometimes creation of object may add complexity or add awful part to the design. Creational design patterns solve the problem via controlling the way of object's creation. They are :
- Abstract factory
- Factory method
- Singleton - provides exactly one instance of class across the system and simple access to it.
The structural design patterns helps to realize composition of classes and objects.
Structural class-creation patterns use inheritance to compose interfaces. Structural object-patterns define ways to compose objects to obtain new functionality. They are :
- Facade - provides unified interface to a set of interfaces in subsystem;
And the last, the behavioral design patterns encapsulates behaviour or allows to extend it. They are:
- Chain of responsibility
- Template method
I think it will be useful trip...