What is Design Pattern?
As Object Oriented
In the Object Oriented design pattern gives the relationship between objects and class.
As Software Engineering
In Software engineering design pattern is general purpose solution of the commonly occur problem. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
Why to use design Patterns?
- Design patterns can speed up the development process by providing tested, proven development paradigms.
- Effective software design requires considering issues that may not become visible until later in the implementation.
- Reusing design patterns helps to prevent subtle issues that can cause major problems, and it also improves code readability for coders and architects who are familiar with the patterns.
Design Patterns are categorized as …..
Creational Pattern: In software engineering, creational design patterns are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation.
Creational Patterns are further categorized as…..
- Abstract Factory
- Factory Method
- Lazy Initialization
Structural Pattern In Software Engineering, Structural Design Patterns are Design Patterns that ease the design by identifying a simple way to realize relationships between entities.
Structural Patterns are further categorized as…..
Behavior Patterns are design patterns that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication.
Behavior Patterns are further categorized as…..
- Chain of Responsibility
- Template method