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.

advanced

Two-Level Cache Pattern

Combine an L1 in-memory cache with an L2 distributed cache to reduce latency for hot keys while...

intermediate

Type Object Pattern

Define game object types as runtime data rather than hard-coding them as classes, enabling...

intermediate

Unit of Work Pattern

Track changes to in-memory objects during a business transaction and commit all updates atomically...

intermediate

Value Object Pattern

Model domain concepts by value rather than identity. An immutable object defined by its attributes,...

advanced

Visitor Pattern

Represent an operation to be performed on elements of an object structure without changing the...

advanced

Visitor Pattern for Extensible Operations on Object

Separate algorithms from the objects they operate on, allowing new operations to be added without...

advanced

Write-Behind Cache Pattern

Write to cache synchronously and persist to the database asynchronously for high-throughput write...

intermediate

Write-Through Cache Pattern

Synchronously write to both cache and backing store so the cache always has the latest data without...

intermediate

GraphQL Connection Pagination Pattern

Implement Relay-style cursor-based pagination with edges, nodes, and pageInfo for stable GraphQL...

advanced

GraphQL Federated Entity Pattern

Learn the GraphQL federated entity pattern with Apollo Federation. Share entity types across...

intermediate

GraphQL Mutation Validation Pattern

Centralize input validation for GraphQL mutations using custom validators, schema directives, and...

beginner

Feature Specification Template

A template for writing clear, actionable feature specifications that align engineering, product,...

beginner

User Story and Acceptance Criteria Template

A user story template that connects user needs to implementation with clear acceptance criteria,...

product-management template user-story design-pattern
advanced

Clean Architecture

A practical guide to Uncle Bob's Clean Architecture: organize code into layers so that frameworks,...

advanced

CQRS — Command Query Responsibility Segregation

A complete guide to CQRS: separate read and write models to optimize performance, scalability, and...

advanced

Domain-Driven Design (DDD) — A Practical Guide

Learn DDD fundamentals: bounded contexts, entities, value objects, aggregates, and how to model...

advanced

Event Sourcing — State as a Sequence of Events

A detailed analysis into Event Sourcing: persist state changes as events, reconstruct aggregates...

advanced

Hexagonal Architecture — Ports, Adapters, and Testability

A complete guide to Hexagonal Architecture (Ports and Adapters): structure applications so domain...

hexagonal-architecture ports-and-adapters domain-driven-design testability
beginner

Layered Architecture — N-Tier Explained

A practical guide to Layered (N-Tier) Architecture: separating presentation, business logic, and...

intermediate

Modular Monolith — A Pragmatic Architecture

A practical guide to Modular Monoliths: combine the simplicity of monoliths with the modularity of...

modular-monolith monolith microservices module-boundaries

No results found.