June 7, 2012

Structure of design patterns


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...


3 comments:

  1. 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.

    Good luck!

    ReplyDelete
    Replies
    1. Yes, you're right.
      Unfortunately, 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!

      Delete
  2. Після тривалого процесу співбесіди з іпотечними кредиторами ми в кінцевому підсумку запропонували пана Педро Джерома про позику в його пропозиції іпотечного кредиту. Як перший покупець житла, він чудово допоміг нам отримати іпотеку, надавши чудові поради та завжди піклуючись про наші інтереси. Я б безумовно рекомендував кожному, хто купує будинок або шукає кредитора з позитивною позикою для фінансування своїх потреб або бізнесу, використовувати пана Педро Джерома та його команду для будь-якого виду позики. Я обов’язково скористаюся ними знову в майбутньому. Ви можете зв’язатися з кредитним офіцером Педро Джеромом за електронною поштою: pedroloanss@gmail.com або через WhatsApp: WhatsApp: +1-8632310632 Удачі.

    ReplyDelete