In a scenario where CQRS and Domain Driven Design approachs are used in conjunction, is it allowed to implement the ‘Query side model’ in an anemic style?
In my opinion:
-
The domain driven design concepts fit well with the ‘Command side’,where the business logic is implemented and business rules/invariants must be ensured/granted.
-
The Query side is supposed to be always valid, as a result of the
Command side. The Query model’s goal should be the most convenient and performant way to retrieve data, then checking business rules and invariants.
As a result, I would implements two different models: the ‘rich’ Command model, using DDD style and ‘anemic’ Query model.
What DDD suggest about these points? Is there something more to consider?
Thank you