01 Dec 2023



Intermediate

There are three main types of design patterns:

  1. Creational patterns:

    These design patterns are all about class instantiation or object creation. These patterns can be further categorized into Class-creational patterns and object-creational patterns. While class-creation patterns use inheritance effectively in the instantiation process, object-creation patterns use delegation effectively to get the job done.

    Creational patterns are design patterns in software development focus on the process of object creation. They provide solutions for creating objects in a flexible, efficient, and reusable manner, allowing developers to manage the instantiation process of classes and structures within a system. Creational patterns help ensure that the way objects are created is scalable, adaptable, and promotes good design practices in software development.

    Class-creational Patterns: These patterns deal with the way classes are instantiated. They provide a way to create objects without having to know the specific details of the class being created.

    • Abstract Factory Pattern
    • Factory Method Pattern
    • Singleton Pattern

    Object-creational Patterns: These patterns deal with the process of object creation in a way that is more dynamic and flexible.

    • Builder Pattern
    • Prototype Pattern
    • Object Pool Pattern
  2. Structural patterns: Structural patterns are a category of design patterns in software development that focus on simplifying the organization of classes and objects. These patterns help in composing classes and objects into larger structures while keeping the system flexible and efficient. The primary goal of structural patterns is to ensure that the components of a system are easily interchangeable and can work together seamlessly.

    Types of Structural design patterns:

    • Adapter
    • Decorator
    • Composite
    • Bridge
    • Flyweight
    • Façade
    • Proxy
  3. Behavioral patterns: Behavioral patterns are a type of software design pattern that focuses on the communication and interaction between objects within a system. They provide solutions for common communication patterns between objects, such as how objects can share information, how they can respond to events, and how they can coordinate their actions. Behavioral patterns are concerned with the algorithms and the assignment of responsibilities between objects.

    Types of Behavioral design patterns:

    • Observer
    • Strategy
    • Command
    • Template Method
    • State
    • Chain of Responsibility
    • Iterator
    • Visitor
    • Memento
    • Interpreter
    • Mediator