
In Programming world, Design pattern is often confused with algorithm, as both concepts described the solution to some problem. Algorithms are always defines some set of actions to achieve final result however, design pattern is high level description of solution.
- Design pattern is typical solutions for commonly occurring problems.
- We can say that it is template for your recurring design problem.
- We cannot say that design pattern is particular piece of code, rather it is an general concept build around your problem.
Advantages of Design Pattern
- Reusable: Design patterns are reusable across the projects.
- Defined System Blocks: Solutions provided by the design patterns help to define the system architecture.
- Transparency: Design patterns provide transparency to design of an application.
- Well proved & Testified solutions: Solutions provide by the Design patterns are well proved and testified since they have been built upon the knowledge and experience of experts.
- Build Robust & Better System: Design patterns provide higher level of clarity of system architecture and build the robust and configurable system.
Categorization of Design Pattern
Design pattern is categorize in to two parts
- Core Java Design Pattern
- JEE Design Pattern
Patterns Available in Core Java
There are basically 3 design patterns available in Core Java which are further divided in to sub parts.
- Creational Design Pattern
- Factory Pattern
- Abstract Factory Pattern
- Singleton Pattern
- Prototype Pattern
- Builder Pattern
- Structural Design Pattern
- Adapter Pattern
- Bridge Pattern
- Composite Pattern
- Decorator Pattern
- Facade Pattern
- Flyweight Pattern
- Proxy Pattern
- Behavioral Design Pattern
- Chain of Responsibility Pattern
- Command Pattern
- Interpreter Pattern
- Iterator Pattern
- Mediator Pattern
- Memento Pattern
- Observer Pattern
- State Pattern
- Strategy Pattern
- Template Pattern
- Visitor Pattern
