-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Came from:
/cc @matthiasnoback @ashishkpoudel @cherifGsoul @stemmlerjs
Just finished reading your "Web Application Architecture" book @matthiasnoback . I finally understood the difference between READ and VIEW models. In your chapter about layers you suggest to put VIEW models into the application layer. But where to put the READ models?
Since in #CQRS for instance a read model represents the state of the write model, some people state it should belong to the domain layer. I agree VIEW models are optimized for presentation and should live elsewhere. E.g. application or as we like to add a "presentation" layer.
@matthiasnoback states:
I'm not sure if the distinction between read and view model is a very common one. For a view model is used to expose data to actors (e.g. users). A read model exposes data to the system itself (i.e. it's for internal use). It makes sense to put that one in the domain layer.
Related: