Learning path · 12 · intermediate
From monolith to microservices
A path through architecture styles in the order you usually meet them in a growing system: from the monolith and modules, through layers, the hexagon, clean and onion architecture and vertical slices, to CQRS, event sourcing, events, microservices and strategic DDD.
- The Monolith: one application, one deployment, and why it is often the right start
What a monolith really is, when it is the best choice, how it turns into a big ball of mud and how to get out of it without a revolution. Structure in .NET, Java, Node.js, Go and Python.
- The Modular Monolith: hard boundaries without the cost of the network
One process and one deployment, but modules with a public API, their own data and communication through events. How to build it in .NET, Java (Spring Modulith), Node.js, Go and Python, and how to guard the boundaries with tests.
- Layered architecture: presentation, logic, data – and where it breaks
The oldest and most popular way of structuring business applications: closed and open layers, layers versus tiers, code in C#, TypeScript, Java, Go and Python, ArchUnit and NetArchTest tests, and the road to the hexagon.
- Pierogi in the Hexagon
Hexagonal architecture in .NET explained over a beer — so that even your aunt gets it at a family party
- Clean Architecture: the dependency rule and use cases at the centre
Robert C. Martin's Clean Architecture without the myths: four circles, the dependency rule, input and output ports, the presenter. Structure and a use case in C#, TypeScript, Java, Go and Python, plus an honest list of costs.
- Onion architecture: the domain model in the middle, infrastructure outside
Jeffrey Palermo's Onion Architecture: four tenets, the layers of the core (model, domain services, application services), the difference between a domain service and an application service, and code in C#, TypeScript, Java, Go and Python…
- Vertical slice architecture: code by feature, not by layer
Jimmy Bogard's Vertical Slice Architecture: every feature of the system is a separate slice from the endpoint to the database. Structure and a complete slice in C#, TypeScript, Java, Go and Python, how it combines with CQRS and the…
- CQRS: one model for changing, another for reading
Command Query Responsibility Segregation without overdoing it: from Bertrand Meyer's CQS, through three levels of CQRS, to projections and eventual consistency. Commands, queries and projections in C#, TypeScript, Java, Go and Python.
- Event sourcing: store the facts, not just the latest state
State as a sequence of immutable events: streams, rehydration by folding, optimistic concurrency, projections, snapshots and event versioning. An aggregate and an event store in C# (Marten), TypeScript, Java, Go and Python.
- Event-driven architecture: who publishes, who listens and what can go wrong
Event-driven architecture in practice: Fowler's four meanings of "events", choreography and orchestration, delivery guarantees, the outbox, idempotent consumers, ordering and contracts. Code in C#, TypeScript, Java, Go and Python.
- Microservices: independent deployments, real costs and when it pays off
The microservice style according to Lewis and Fowler, without the marketing: boundaries by business capability, own data, synchronous and asynchronous communication, resilience, prerequisites and the road from the monolith. Code in C#,…
- DDD strategic design: subdomains, bounded contexts and context maps
The strategic part of Domain-Driven Design in practice: the ubiquitous language, core, supporting and generic subdomains, bounded contexts, context map patterns and the anticorruption layer. Examples in C#, TypeScript, Java, Go and Python.