Design pattern
Design pattern is a general repeatable solution to a
commonly occurring problem in object-oriented software design.
its like library of solution to desired
problem. These solutions were obtained
by trial and error by numerous software developers over quite a substantial
period of time. Design pattern is a
description or template for how to solve a problem that can be used in many
different situations.
All design patterns are tested, proven development paradigms. Design
Patterns improves code readability for coders and architects familiar with the
patterns.
History
In 1994, four authors Erich Gamma, Richard Helm, Ralph
Johnson und John Vlissides published a book titled Design Patterns - Elements
of Reusable Object-Oriented Software which initiated the concept of Design
Pattern in Software development. These authors are collectively known as Gang
of Four (GOF).
Types of Design Pattern
1.Creational design Patterns
These design pattern provides way to create
objects . It hides the logic of object creation. Objects are not created
directly by calling constructor. It adds the flexibility in deciding which
objects needs to be created for a given use case. like passing parameter will
decide which object to create .
·
Abstarct factory
·
Builder
·
factory Method
·
Object pool
·
Prototype
·
Singleton
2.Structural design Patterns
This design pattern concerns the class and
object composition. It use inheritance to compose interfaces and define
ways to compose objects to obtain new functionality.
·
Adapter
·
Bridge
·
Composite
·
decorator
·
facade
·
Flyweight
·
Private class data
·
Proxy
3. Behavioral
design pattern
Its about the communication between objects.
·
Chain of responsibility
·
Command
·
Interpreter
·
Iterator
·
Mediator
·
Memento
·
Null Object
·
Observer
·
State
·
Strategy
·
Template method
·
Visitor
0 comments:
Post a Comment