--

I bumped into a picture in a book the other day which illustrates exactly that. It's a shame I don't remember the source. Basically it boils down to:

Is the subdomain type a core domain? (yes) Is the application monetary, transactional, is there a requirement for an audit log? (yes) Use an event sourced domain model + CQRS

Or: Is the subdomain type a core domain? (yes) Is the application monetary, transactional, is there a requirement for an audit log? (no) Use ports and adapters:

Or: Is the subdomain type a core domain? (no) Complex data structures? (Yes) Layered architecture (4 layers)

Or: Is the subdomain type a core domain? (no) Complex data structures? (No) Layered architecture (3 layers)

And I recon there are plenty of other flowcharts similar to that. Anyways.. Yes.. I agree... CQRS is not a silver bullet...

--

--

Albert Starreveld

Passionate about cloud native software development. Only by sharing knowledge and code we can take software development to the next level!