Topic
Architecture & Design
Patterns and design choices for .NET systems that need clear boundaries, reliable messaging, and room to change.
Aspire Service Discovery: Names, Ports, Replicas
Learn how Aspire service discovery turns logical names into endpoints with WithReference, HttpClient resolution, health checks, and replica load balancing.
Read article →Circuit Breaker Pattern in .NET with Polly
Build a circuit breaker in modern .NET with Polly and HttpClient resilience. Tune the failure window, compose retries safely, and prove recovery.
Read article →Message Queue vs Event Bus: Choose the Topology
Compare message queues, event buses, and pub/sub by delivery topology. Choose competing workers or fan-out, then design retries and ordering honestly.
Read article →Structured Logging in .NET: Write Logs You Can Query
Learn structured logging in .NET with ILogger message templates, named fields, scopes, correlation IDs, safe data handling, and query-first design.
Read article →Transactional outbox pattern in .NET: publish without losing messages
Saving data and publishing an event are two writes that can disagree. Build a transactional outbox with EF Core, a retrying publisher, and idempotent consumers so crashes do not lose business events.
Read article →AddSingleton vs AddScoped vs AddTransient: what each promises
AddSingleton vs AddScoped vs AddTransient in plain terms: what each lifetime promises, sensible defaults, and the captive dependency bug that ships.
Read article →Caching strategies: cache-aside, invalidation, and stampedes
Caching strategies from the cache-aside flow to the hard parts: invalidation owned by a human and stampedes tamed by single-flight and jitter.
Read article →Architecture fitness functions: tests that fail the build when your layers rot
Architecture decays because nothing fails the build when the domain references the DbContext. Fitness functions with ArchUnitNET assert layering and dependency rules in CI like any test.
Read article →Hexagonal architecture in .NET without the dogma
Ports and adapters explained in plain C#: domain in the center, ports as interfaces, adapters as infrastructure. Why it beats layered spaghetti, and when it is overkill for a CRUD app.
Read article →Dependency inversion in C# is not about your DI container
The D in SOLID is the most quoted and least applied principle. Dependency inversion means depending on abstractions you own and pointing dependencies inward, not registering services.
Read article →