Design Patterns

design pattern

Why design patterns?

  • A design pattern provides a general reusable solution for the common problems that occur in software design.
  • The pattern typically shows relationships and interactions between classes or objects.
  • The idea is to speed up the development process by providing well-tested, proven development/design paradigms.
  • Design patterns are programming language independent strategies for solving a common problem.
  • That means a design pattern represents an idea, not a particular implementation.
  • By using design patterns, you can make your code more flexible, reusable, and maintainable.

Types of design patterns

  1. Creational Design Patterns
  2. Structural Design Patterns
  3. Behavioral Design Patterns

Creational Design Patterns

Creational design patterns provide various object creation mechanisms, which increase flexibility and reuse of existing code.

Types of creational design patterns

  1. Factory Method
  2. Abstract Factory
  3. Builder
  4. Prototype
  5. Singleton

Structural design patterns

Types of structural design patterns

  1. Adapter
  2. Bridge
  3. Composite
  4. Facade
  5. Proxy
  6. Decorator
  7. Flyweight

Behavioral design patterns

Types of behavioral design patterns

  1. Chain of Responsibility
  2. Command
  3. Iterator
  4. Mediator
  5. Memento
  6. Observer
  7. State
  8. Strategy
  9. Template Method
  10. Visitor