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
- Builder
- Factory method
- Prototype
- 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 :
- Adapter
- Bridge
- Composite
- Decorator
- Facade - provides unified interface to a set of interfaces in subsystem;
- Flyweight
- Proxy
And the last, the behavioral design patterns encapsulates behaviour or allows to extend it. They are:
- Chain of responsibility
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template method
- Visitor
I think it will be useful trip...
I think it is very good idea. Most difficult would be to keep writing posts regularly. I see you are already missing one for 16th of June.
ReplyDeleteGood luck!
Yes, you're right.
DeleteUnfortunately, in last Saturday I had no free time.
But, in this weekend I'm going to write about two patterns.
Thanks you for your feedback!