What is a Design Pattern?
A design pattern is a reusable solution to a commonly occurring problem within a given context in software design. It’s not a finished design that can be transformed directly into source or machine code. Instead, it’s a description or template for solving a problem that can be employed in numerous situations.
Categories
Design patterns are primarily categorized into three types: Creational, Structural, and Behavioral.
Creational Patterns: These patterns deal with object creation mechanisms, trying to create objects in a manner suitable to the situation.
Structural Patterns: These patterns concern class and object composition. They offer different ways to create a structure among objects.
Behavioral Patterns: These are about communication patterns among objects, how they interact, and distribute responsibility.
1. Creational Patterns
- Java Singleton Design Pattern
- Java Factory Method Design Pattern
- Java Abstract Factory Design Pattern
- Java Builder Design Pattern
- Java Prototype Design Pattern
2. Structural Patterns
- Java Adapter Design Pattern
- Java Bridge Design Pattern
- Java Composite Design Pattern
- Java Decorator Design Pattern
- Java Facade Design Pattern
- Java Flyweight Design Pattern
- Java Proxy Design Pattern
3. Behavioral Patterns
- Java Chain of Responsibility Design Pattern
- Java Command Design Pattern
- Java Interpreter Design Pattern
- Java Mediator Design Pattern
- Java Memento Design Pattern
- Java Observer Design Pattern
- Java State Design Pattern
- Java Strategy Design Pattern
- Java Template Method Design Pattern
- Java Visitor Design Pattern