DEV Community

Discussion on: CQRS is Software Development Schizophrenia

Collapse
 
jaecktec profile image
Constantin

I found cqrs very practical so I can test my ui stateless. You can also do it without using a broker at all. Just plain old objects and callbacks. Observables make the api neat and readable, but that's it.

My testing was simply 'when state contains this, button is visible'
'on click of button event got dispatched "
'on Event, state got modified (or sent http request to server and stored response) '

Sure, it's 3 unit tests, but it really helps.
Bases on your posts I belive you've used angular, so a good companion was 'ngxs'