3 ms·
> A better way to implement CQRS is to separate commands/queries from their handlers and utilize an in-process messaging service to dispatch the command/query o
by bertylicious 2y ago
> A better way to implement CQRS is to separate commands/queries from their handlers and utilize an in-process messaging service to dispatch the command/query objects to their respective handlers.
I hate this pattern from the very bottom of my heart. Now I cannot simply follow the call of a function with the help of my IDE anymore, no, I'll have to awkwardly search for a handler that processes the query/command in question. Figuring out what a specific API endpoint actually does in such an architecture is a cruel nightmare of indirection and boilerplate. And all that because some overambitious dev desperately wanted to build a "high-level task execution pipeline" for the joy of it...
- sebazzz 2y agoThat is mostly an organization issue. You can put the handler/response/validator in the same file as the request.