Saturday, January 13, 2018

Design patterns

Design patterns provide general solutions or flexible way to solve common design problems.
Design Patterns in object oriented world is reusable solution to common software design problems which occur again and again in real world application development. It is a template or description for how to solve a problem which can be used in many different situations.
Design patterns are the most powerful tool for software developer. It is important to understand design patterns rather than memorizing its classes, methods and properties. It is also important to learn how to apply pattern to specific problem to get the desired result. This will be required continuous practice of using and applying design patterns in day to day software development. 
What is Design Patterns ?

Design patterns may be said as a set of probable solutions for a particular problem which is tested to work best in certain situations. In other words, Design patterns, say you have found a problem. Certainly, with the evolution of software industry, most of the others might have faced the same problem once. Design pattern shows you the best possible way to solve the recurring problem.
Uses of Design Patterns

While creating an application, we think a lot on how the software will behave in the long run. It is very hard to predict how the architecture will work for the application when the actual application is built completely. There might issues which you cant predict and may come while implementing the software. Design patterns helps you to find tested proven design paradigm. Following design pattern will prevent major issues to come in future and also helps the other architects to easily understand your code.
History of Design Patterns

When the word design pattern comes into mind, the first thing that one may think is the classical book on Design Pattern "Gangs of Four" which was published by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. In this book, it is first discussed capabilities and pitfalls of Object oriented programming, and later on it discusses about the classic Design Patterns on OOPS.
Types of Design Pattern

Design patterns can be divided into 3 categories.
  • Creational Patterns : These patterns deals mainly with creation of objects and classes.
  • Structural Patterns : These patterns deals with Class and Object Composition.
  • Behavioural Patterns : These mainly deals with Class - Object communication. That means they are concerned with the communication between class and objects.
Type:
  • Creational Design Pattern
  • Structural Design Patterns
  • Behavioral Design Patterns
Creational Design Pattern
  • Factory Method
  • Abstract Factory
  • Builder
  • Prototype
  • Singleton


Structural Design Patterns
  • Adapter
  • Bridge
  • Composite
  • Decorator
  • Façade
  • Flyweight
  • Proxy
  • Behavioral Design Patterns


Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Visitor
  • Template Method

No comments:

Post a Comment