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.

intermediate

Role Pattern

Assign dynamic roles to objects at runtime instead of hard-coding behavior in class hierarchies,...

advanced

Saga Pattern

Manage distributed transactions across multiple services by chaining local transactions with...

advanced

Scheduler Agent Supervisor Pattern

Coordinate resilient job scheduling by separating scheduling logic from execution agents and adding...

intermediate

Sequential Convoy Pattern

Preserve message ordering for related messages in a distributed system by grouping them into...

advanced

Serverless Event Sourcing Pattern

Store function state as an append-only event log so workflows can be replayed, audited, and...

intermediate

Serverless Fanout Pattern

Broadcast a single event to multiple independent consumers via SNS, EventBridge, or SQS so each...

advanced

Serverless Function Composition Pattern

Chain serverless functions via Step Functions or orchestration layers to build multi-step workflows...

advanced

Serverless Throttling Pattern

Handle backpressure in serverless by using SQS, token buckets, and concurrency limits to protect...

intermediate

Serverless Warm Pool Pattern

Keep Lambda functions warm by sending periodic ping events to reduce cold start latency for...

advanced

Sharding Pattern

Split a large dataset into smaller partitions (shards) distributed across multiple servers to...

beginner

Singleton Pattern

Ensure a class has only one instance and provide global access to it. A creational design pattern...

intermediate

SOLID Principles in TypeScript with Practical Examples

Apply the five SOLID principles to TypeScript code to improve maintainability, testability, and...

intermediate

Specification Pattern

Encapsulate business rules for selecting objects as reusable, composable predicate objects that can...

intermediate

State Pattern

Allow an object to alter its behavior when its internal state changes. A behavioral design pattern...

beginner

Static Content Hosting Pattern

Deploy static files to a dedicated content delivery network or object storage to offload origin...

beginner

Strategy Pattern

Define a family of algorithms, encapsulate each one, and make them interchangeable. A behavioral...

beginner

Template Method Pattern

Define the skeleton of an algorithm in a base class, letting subclasses override specific steps...

intermediate

Throttling Pattern

Limit the rate at which a system processes requests or consumes resources to prevent overload,...

beginner

Timeout Pattern

Prevent operations from hanging indefinitely by enforcing a maximum execution time. A resilience...

intermediate

Twin Pattern

Provide an alternative to multiple inheritance by linking two separate classes through mutual...

No results found.