Skip to main content

On This Page

Evolution of C# Software Architecture: From 3-Layer Monoliths to Vertical Slicing

2 min read
Share

These articles are AI-generated summaries. Please check the original sources for full details.

Building software in C#: part 1 - history

Miroslav Thompson examines the historical trajectory of C# development starting in 2010. The evolution spans from basic layered architectures to complex DDD and Event Sourcing paradigms.

Why This Matters

There is a persistent gap between theoretical architectural ideals and practical implementation. While models like Onion Architecture or DDD/ES/CQRS promise purity, they often introduce extreme complexity—such as difficulties in enforcing simple uniqueness constraints—resulting in developers spending more time on ‘engineering a starship’ than shipping production features.

Key Insights

  • The dominant trend in 2010 was the 3-layer monolithic architecture, consisting of presentation, business, and database layers.
  • Domain-Driven Design (DDD) prioritizes the ‘domain’ as the core business logic, requiring a ‘domain expert’ to maintain a ubiquitous language.
  • The combination of DDD, Event Sourcing (ES), and CQRS creates high overhead due to requirements for snapshots, versioning, and handling eventual consistency.
  • MediatR shifted development toward treating the domain as a flat list of distinct units of work via request pipelines.
  • Vertical Slicing replaces technical layer organization with feature-based grouping, placing UI, business logic, and data access for a specific feature into a single folder.

Practical Applications

  • )Use case: Single-server web applications using Vertical Slicing to group all relevant layers within feature folders for better modularity.
  • )Pitfall: Misinterpreting 3-layer architecture as independent components that communicate arbitrarily, leading to UI layers communicating directly with databases.

References:

Continue reading

Next article

Building a Terminal Arcade Game with Go

Related Content