Skip to main content

17 docs tagged with "design-patterns"

View all tags

Abstract Factory Pattern

A creational pattern that produces families of related objects without specifying their concrete classes.

Adapter Pattern

A structural pattern that allows incompatible interfaces to work together by wrapping one interface with a compatible one.

Builder Pattern

A creational pattern that separates the construction of a complex object from its representation, allowing the same construction process to produce different results.

Chain of Responsibility Pattern

A behavioral pattern that passes a request along a chain of handlers, each deciding to process it or pass it to the next handler.

Command Pattern

A behavioral pattern that encapsulates a request as an object, enabling undo/redo, queuing, logging, and parameterization of operations.

Composite Pattern

A structural pattern that composes objects into tree structures to represent part-whole hierarchies, letting clients treat individual objects and compositions uniformly.

Decorator Pattern

A structural pattern that dynamically adds behavior to an object by wrapping it in decorator objects, without altering the original class.

Facade Pattern

A structural pattern that provides a simplified interface to a complex subsystem, hiding its internal complexity from client code.

Factory Method Pattern

A creational pattern that defines an interface for creating an object but lets subclasses decide which class to instantiate.

Observer Pattern

A behavioral pattern where an object (subject) maintains a list of dependents (observers) and notifies them automatically when its state changes.

Prototype Pattern

A creational pattern that creates new objects by copying (cloning) an existing instance rather than instantiating from scratch.

Proxy Pattern

A structural pattern that provides a surrogate object which controls access to another object, adding security, caching, logging, or lazy initialization transparently.

Singleton Pattern

A creational pattern that ensures a class has exactly one instance and provides a global access point to it.

State Pattern

A behavioral pattern that allows an object to change its behavior when its internal state changes, as if the object changed its class.

Strategy Pattern

A behavioral pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable at runtime without changing the client.

Template Method Pattern

A behavioral pattern that defines the skeleton of an algorithm in a base class, deferring specific steps to subclasses without changing the overall structure.