Design Patterns

Common architectural and software design patterns

Eventual Consistency in DDD: Measure the Window with Sagas
Design PatternsData Management

Eventual Consistency in DDD: Measure the Window with Sagas

Eventual consistency in DDD works when the inconsistency window is a business number. Build a .NET saga with outbox and idempotent consumers, then alert on it.

13 min read
Mutation Testing: Your Tests Are Lying and Math Can Prove It
Quality & TestingDesign Patterns

Mutation Testing: Your Tests Are Lying and Math Can Prove It

Mutation testing breaks your code on purpose to find tests that verify nothing, turning test quality into a number you can measure. Hands-on with Stryker.NET.

11 min read
Event Sourcing: A History Lesson Your Database Actually Wants
Design PatternsData Management

Event Sourcing: A History Lesson Your Database Actually Wants

Event Sourcing stores every state change as an immutable event, so your database keeps the full history. When to use it, and a working C# implementation.

15 min read
Bulkheads: Because One Sinking Service Shouldn't Sink Them All
Design PatternsResilience

Bulkheads: Because One Sinking Service Shouldn't Sink Them All

The bulkhead pattern isolates resource pools so one failing service cannot take down the rest of your platform. With a working .NET 8 demo you can run locally.

10 min read
Spec-Driven Development: Let AI Read the Boring Stuff For You
Architecture PracticesDesign Patterns

Spec-Driven Development: Let AI Read the Boring Stuff For You

Spec-driven development makes the spec the source of truth before any code is written. The four pillars, a Claude Code walkthrough, and where it falls short.

22 min read
When Systems Talk Without Knowing Each Other: Pub-Sub
Design PatternsIntegration

When Systems Talk Without Knowing Each Other: Pub-Sub

Pub-sub architecture lets systems react to the same event without knowing each other. The benefits, when to use it, and lessons from a retail loyalty platform.

8 min read
How to Stop One Service from Burning Down the House
Design PatternsResilience

How to Stop One Service from Burning Down the House

The circuit breaker pattern stops one failing dependency from turning into a retry storm that takes down your platform. A real payment outage, fixed with Polly.

8 min read
The BFF Pattern: Friendship Goals for Frontend and Backend
Design PatternsAPI Design

The BFF Pattern: Friendship Goals for Frontend and Backend

The BFF pattern gives each frontend its own backend, so mobile, web and TV stop fighting over one shared API. When to use it, and when it is just overhead.

7 min read
The Gentle Art of Strangling Legacy Systems Without Breaking Everything
Design PatternsModernization

The Gentle Art of Strangling Legacy Systems Without Breaking Everything

The strangler fig pattern replaces a legacy system piece by piece behind a facade, so you avoid a risky full rewrite. Lessons from replacing a 15-year-old CRM.

5 min read
The Ambassador Pattern: Because APIs Have Bad Days Too
Design PatternsResilience

The Ambassador Pattern: Because APIs Have Bad Days Too

The ambassador pattern puts a sidecar proxy in front of the APIs your service calls, so retries, timeouts and logging leave your service code. Shown with Envoy.

7 min read