P600Design Patterns
Annex C · 25 notes
Object-oriented, architectural, distributed-systems, and functional pattern notes with pragmatic implementation context.
- 25
- notes
- 70
- minutes
- 24
- references
- 0
- diagrams
ls design-patterns/ --order=reading
- No. 2Adapter PatternAdapter allows classes with incompatible interfaces to work together by converting the interface of one class into an interface expected by the client. It acts as a wrapper that sits between two unrelated components,...2 min
- No. 3Bridge PatternThe Bridge pattern decouples an abstraction from its implementation, so the two can vary independently. It achieves this by using composition: an abstraction class holds a reference to an implementor interface, and...2 min
- No. 4Builder PatternThe Builder pattern separates the construction of a complex object from its representation, allowing step by step construction and the ability to vary the product’s internal representation. It is useful when an object...2 min
- No. 5Chain of Responsibility PatternChain of Responsibility passes a request along a chain of handler objects until one of them handles it. Each handler in the chain either handles the request or passes it to the next handler. This pattern decouples...2 min
- No. 6Command PatternCommand turns a request or operation into a stand alone object that can be stored, passed around, and invoked later. In essence, it encapsulates an action as an object. This decouples the object that invokes the...2 min
- No. 7Composite PatternComposite pattern composes objects into tree structures to represent part whole hierarchies. It lets clients treat individual objects and compositions of objects uniformly. In other words, a composite allows a group of...2 min
- No. 8CQRS (Command Query Responsibility Segregation)CQRS is an architectural pattern that separates read operations from write operations of a data store into different models, commands and queries. The term comes from Command Query Responsibility Segregation . In a...4 min
- No. 9Decorator PatternDecorator attaches new responsibilities or behaviors to an object dynamically, without altering its structure. It provides a flexible alternative to subclassing for extending functionality. A decorator wraps an object...2 min
- No. 10Dependency Injection (and Inversion of Control)While not a “pattern” in the GoF sense, Dependency Injection (DI) is an essential design principle/pattern for modern software construction. It is a technique where an object’s dependencies (its collaborators or...3 min
- No. 11Design patternsDesign patterns Adapter Pattern Bridge Pattern Builder Pattern Chain of Responsibility Pattern Command Pattern Composite Pattern CQRS (Command Query Responsibility Segregation) Decorator Pattern Dependency Injection...5 min
- No. 12Event SourcingEvent Sourcing is an architectural pattern in which state changes are stored as a sequence of events, rather than storing just the current state. Whenever something changes, an event is recorded (typically in an append...3 min
- No. 13Facade PatternFacade provides a unified, simplified interface to a complex subsystem of classes. It hides the complexity of multiple interrelated classes behind a single wrapper interface. This makes the subsystem easier to use for...2 min
- No. 14Factory Method and Abstract FactoryFactory Method is a creational pattern that defines an interface for creating an object but lets subclasses decide which class to instantiate. Instead of calling a constructor directly, the client calls a factory...2 min
- No. 15Microkernel (Plugin) ArchitectureMicrokernel architecture (also known as plugin architecture ) is a pattern where a core system provides minimal functionality, and additional features are implemented as independent plug in modules that extend the...3 min
- No. 16Microservices ArchitectureMicroservices architecture is an architectural style where an application is structured as a collection of small, independently deployable services that communicate over a network (often via HTTP/REST or messaging)....3 min
- No. 17Model-View-Controller (MVC)MVC is an architectural pattern that separates an application into three main components: Model , View , and Controller , each with distinct responsibilities: Model: The data or business logic of the application. It...3 min
- No. 18Observer PatternObserver (also known as Publish/Subscribe or Listener) defines a one to many dependency between objects so that when one object (subject) changes state, all its dependents (observers) are notified automatically. The...2 min
- No. 19Outbox PatternThe Outbox Pattern is an architectural pattern used to guarantee reliable, atomic, and consistent publication of events in distributed systems. Instead of attempting to send external messages within the same...6 min
- No. 20Prototype Pattern(Note: Prototype is less commonly used in everyday backend work but worth knowing.) The Prototype pattern creates new objects by cloning an existing object, known as the prototype. This is handy when object creation is...1 min
- No. 21Proxy PatternA Proxy provides a placeholder or substitute for another object to control access to it. The proxy implements the same interface as the real subject and forwards requests to it, adding extra behavior either before or...2 min
- No. 22Repository PatternThe Repository pattern is an abstraction over data storage that provides a collection like interface for accessing domain objects. Instead of the domain/business logic dealing directly with database queries or data...2 min
- No. 23Saga Pattern for Distributed TransactionsDistributed systems are allergic to “one big transaction.” If your workflow spans multiple services or multiple database shards , you don’t get the luxury of a single ACID transaction covering everything. The Saga...8 min
- No. 24SingletonThe Singleton ensures a class has only one instance and provides a global point of access to it. This is useful for shared resources like configuration, caches, or thread pools, where multiple instantiations could...1 min
- No. 25Strategy PatternStrategy defines a family of interchangeable algorithms, encapsulates each one, and makes them interchangeable at runtime. The core idea is to delegate a specific task (algorithm) to a subordinate object (the...4 min
- No. 26Template Method PatternTemplate Method defines the skeleton of an algorithm in a method, deferring some steps to subclasses. It allows subclasses to redefine certain steps of an algorithm without changing the algorithm’s overall structure....2 min