CQRS
17th June 2024
I recently worked on a project where we were asked to take a CQRS and Event Sourcing approach. Event Sourcing was new to me but I had followed a CQRS approach a few years ago but needed a bit of a refresher.
In case I ever need to re-visit CQRS in future, I'm noting a few links that I found useful below:
NestJS CQRS module documentation
We weren't using Nest but the examples this contains were pretty useful in detailing how we might implement a CQRS approach.
CQRS From Scratch With TypeScript by Jesse Neumann
This gives a nice introduction to CQRS and also an example of how you could set up the Command part of an implementation.
The Jesse Neumann post above led me to Martin Fowler's article. I really enjoyed this piece, particularly the 'When to use it' section. The warnings here match my experience, and I would warn against taking a CQRS approach for the sake of it.