Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cqs]

The tag has no usage guidance.

0
votes
1answer
79 views

Mediator pattern across web API

What are your thoughts on mediator pattern being used from a client and across a web api?, this means: Command definitions are shared between the client and api. Web api exposes only one ...
0
votes
2answers
87 views

Would it be OK if I mention actor in the command/query name when I use CQS pattern

I'm applying Clean Architecture + DDD (maybe) in my project (web Application + REST API). The good thing I learned from the Clean Architecture is using "Interactors" to show business use cases in my ...
3
votes
2answers
147 views

Command Query Separation. How to handle error handling for mutating functions returning void

I am learning about SOLID principles in a Pluralsight course where Command Query Separation is being discussed. I am fine with the query functions returning something (and crucially being non-mutating)...
5
votes
2answers
500 views

Has any language enforced Command–query separation?

As described here, a function can be said to be a query when it returns a value, and a command when it modifies a value. It also states that a function should not be both. That a query should not be ...
1
vote
0answers
96 views

Can we break CQS to get some DRY?

In our codebase we have a lot of controllers with a very similar structure: @my_model.update_owner(something) if @my_model.update_attributes(params) return render_object(@my_model) else ...
4
votes
4answers
180 views

How does CQS gel with database inserts?

I've been searching for weeks for an answer to this question, which seems as though it would be common across pretty much all applications and therefore a problem right at the forefront of CQS. CQS ...