It seems here that the key question is 'what is a View-Model in DDD terms'?
They are not entities - they do not have Identity and a thread of continuity although they may expose the properties of entities that do. The are not value objects - they are not immutable. I would argue that View-Models are actually a way of allowing the user to define a domain event. >From the DDD Pattern: "Model information about activity in the domain as a series of discrete events. Represent each event as a domain object. These are distinct from system events that reflect activity within the software itself, although often a system event is associated with a domain event, either as part of a response to the domain event or as a way of carrying information about the domain event into the system. "A domain event is a full-fledged part of the domain model, a representation of something that happened in the domain. Ignore irrelevant domain activity while making explicit the events that the domain experts want to track or be notified of, or which are associated with state change in the other model objects" https://domainlanguage.com/ddd/patterns/DDD_Reference_2011-01-31.pdf As Jeroen says, these are domain objects. I would argue that the purpose of these domain objects is to represent activity in the domain. View-models are a mechanism to make information about domain activity available while filtering out irrelevant detail. The requesting of the view-model and the submitting of data are both system-events, but the purpose they serve is to carry information about the domain events between the user and the system. Any thoughts? Regards, Ged On Wed Dec 31 2014 at 13:38:19 Jeroen van der Wal <[email protected]> wrote: > I like this discussion because it's defining where Apache Isis is right > now. Personally I think Isis has grown far beyond the concepts of DDD so > sticking to it's grammar would limit ourselves. > > In the applications I'm developing things aren't black or white: we have > view models that represent documents in a CMIS document store but in DDD > terms they are domain entities. We have view models that are based on > entries in a database view but in DDD terms these are domain entities. We > have view models that are created on the fly and never get persisted but in > DDD terms they are domain entities. > > As you might expect I opt to simply call everything a domain object. > Residing in the application's domain object model. Very easy to explain to > newcomers too. > > Cheers, > > Jeroen > >
