Building a better Web API architecture using CQRS

Joseph Woodward Profile Picture Joseph Woodward
We've all worked with a monolith and we all know the unbearable pains that come with them. Controllers fatter than Thomas the Tank Engine's Fat Controller, repositories that quickly become a dumping ground for data access with zero cohesion and services that make the SOLID principles cry. All of these violations make for a codebase that's hard to maintain, tough to evolve and a terror to work with. In this talk we'll look at an alternative architectural approach that favours breaking your application into features using MediatR, isolating our business logic and utilising the Command/Query Responsibility Segregation pattern to isolate​​ our reads from our writes. We'll also look at how we can utilise features in MediatR 3.0 to introduce cross-cutting concerns such as monitoring, metrics gathering, logging and caching to our API.