For OOps refer to Click Here
Now lets us talk about Design patterns, Lets us start by putting some questions across the table....
1.What is a Design Pattern?
2.What are different Design patterns?
3.Why do i need it?
4.How do you know when to use design patterns?
I will be discussing more questions in this blog but for now lets Proceed
Good to go.......
Developers around the world face some common problems and these common problems ideally should have a common solution too,It is this solution when documented and used over and over becomes a design pattern.Design pattern describes a problem which occurs over and over again in our environment, and describes its solution in such a way that this solution can be used to solve the problem whenever need is.Design patterns are problem specific and thereby are implemented after knowing the behavior of project, on which the design pattern needs to be implemented.Thus there needs to be lots of thought process when choosing for design pattern of project ex:-
1.We need to understand the problem at hand. Break it down to finer grained problems. Each design pattern is meant to solve certain kinds of problems. This would narrow down our search for design patterns.
2.Read the problem statement again along with the solution which the design pattern will provide. This may instigate to change a few patterns that we are to use.
3.Now figure out the interrelations between different patterns. Also decide what all patterns will remain stable in the application and what all need to change (with respect to Change Requests received from the clients).
Types Of Software Patterns
Riehle and Zullighoven in “Understanding and Using Patterns in Software Development” mention three types of software patterns
l Conceptual Pattern
Pattern whose form is described by means of terms and concepts from the application domain
2 Design Pattern
Pattern whose form is described by means of software design constructs,
such as objects, classes, inheritance and aggregation
3 Programming Pattern (Programming Idiom)
Pattern whose form is described by means of programming language
constructs
Our focus will be on the design patterns and what we will try to understand is types of Patterns, Levels Of Abstraction of design patterns and how can we implement these patterns in our software projects..................
Types Of Design Patterns
1. Creational Patterns
- Factory Pattern
- Abstract Factory Pattern
- Singleton Pattern
- Builder Pattern
- Prototype Pattern
2. Structural Patterns
- Adapter Pattern
- Bridge Pattern
- Composite Pattern
- Decorator Pattern
- Facade Pattern
- Flyweight Pattern
- Proxy Pattern
3. Behavioral Patterns
- Chain of Responsibility Pattern
- Command Pattern
- Interpreter Pattern
- Iterator Pattern
- Mediator Pattern
- Memento Pattern
- Observer Pattern
- State Pattern
- Strategy Pattern
- Template Pattern
- Visitor Pattern
A creational pattern abstracts the instantiation process.
A structural pattern groups objects into larger structures.
A behavioral pattern defines better communication among objects