Tuesday 26 December 2017

DESIGN PATTERNS


What is design patterns?

Design pattern is set of design that can be applied in any of programming languages that uses OOPS concept, Which gives the template to solve the problems occurring in software design. Design patterns are reusable.

Use and Advantages of design patterns:

  • Design patterns are well tested and proven. Directly can be applied to solve the problems. It speeds up your software design and development phase of software engineering process. 

  • Reusable where you face same set of problem. It reduces the time of project design, development and testing phase. Since, Already been used and tested in other other projects.

Type of design patterns:
  1. Creational  Design Patterns
  2. Structural Design Patterns
  3. Behavioral Design Patterns

1. Creational Design Patterns:

Creational design pattern focus on class instantiation. Such as class creations and object creations. Class creations use inheritance effectively in the instantiation process and Object creations use delegation effectively to get the job done.

  • Singleton
  • Abstract factory
  • Factory method
  • Prototype
  • Builder
  • Object Pool

2. Structural Design Patterns:

Focus on class and object composition. Classes defines as inheritance to compose interface and Object defines way to compose objects to obtain new functionalities.

  • Composite
  • Adapter
  • Bridge
  • Decorator
  • Facade
  • Flyweight
  • Private class data
  • Proxy
3. Behavioral Design Patterns:

Mainly focuses on communication between multiple objects of system.
  • Chain of responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Null Object
  • Observer
  • State
  • Strategy
  • Template method
  • Visitor


Upcoming Post :

Will cover each and every design patterns briefly with one use case and example program using c++ language.