design
Practical resources about design for software engineers.
152 results
Patterns for Maintainable Code
Design patterns are not cookbook recipes — they are a shared vocabulary for discussing solutions to recurring problems. Knowing when to apply (and when to avoid) a pattern is a hallmark of senior engineering.
Browse our catalog of creational, structural, and behavioral patterns. Each entry includes a real-world scenario, UML diagrams, implementation in multiple languages, and a discussion of trade-offs. From Singleton to Outbox, find the right tool for your context.
Data Access Object (DAO) Pattern
Abstract and encapsulate all access to a data source by exposing a clean interface while hiding...
Data Mapper Pattern
Separate in-memory domain objects from the database by delegating persistence to a dedicated mapper...
Database per Service Pattern
Give each microservice its own private database to ensure loose coupling, independent deployment,...
Decorator Pattern
Add new functionality to objects dynamically by wrapping them. A structural design pattern for...
Decorator Pattern for HTTP Request Pipelines
Use the Decorator pattern to compose cross-cutting concerns like logging, metrics, and retries into...
Dependency Injection Pattern
Supply dependencies from outside rather than creating them internally. An architectural pattern for...
Dependency Injection Container in TypeScript
Build a lightweight DI container that resolves class dependencies automatically, enabling testable,...
Distributed Lock Pattern
Coordinate mutually exclusive access to shared resources across distributed nodes using a...
Domain Event Pattern
Capture and publish major occurrences within a domain model to decouple side effects from core...
Eager Loading Pattern
Load related data in a single query rather than multiple round-trips, preventing the N+1 problem...
Entity-Component-System (ECS) Pattern
Compose entities from pure data components and process them with systems, enabling high-performance...
Event Bus Pattern
Decouple components by routing events through a central bus. A behavioral pattern for loosely...
Event-Carried State Transfer Pattern
Replicate state changes across services by publishing events that carry the full updated entity...
Event Sourcing Pattern
Store the state of an application as a sequence of events rather than storing only the current...
Facade Pattern
Provide a simplified interface to a complex subsystem. A structural pattern that hides...
Factory Pattern
Create objects without specifying the exact class to instantiate. A creational design pattern for...
Flyweight Pattern
Share objects to support large numbers of fine-grained objects efficiently. A structural design...
Flyweight Pattern for Efficient Large-Scale Object Sharing
Use the Flyweight pattern to minimize memory usage by sharing as much data as possible between...
Front Controller Pattern
Route all incoming requests through a single handler that dispatches to the appropriate page...
Gatekeeper Pattern
Place a validation and security boundary at the edge of a system to inspect, sanitize, and...
No results found.