Re: How to identify if a concept should be represented as a entity or as a value obj
Remy Fannader <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAMdXxPAvhnFykb=WW=bskdUbvtYqdYsAUA==WkgCWHOPFNgJYA@mail.gmail.com> |
Entities have a life-cycle of their own while the life-cycle of VOs is set by their use. That means that entities can identified independently and accessed by unknown applications. http://caminao.wordpress.com/how-to-represent-objects-and-activities/identities-2/identities/ Remy. On 25 February 2013 06:46, sudarshan89 <[email protected]> wrote: > ** > > > > I am trying to find out what question one must ask during the modelling > process to detect if a concept should be modeled as a entity or as a value > object. > > My current understanding is the below > > If in our domain a car engine can be swapped out and put in another car > then it has existence of its own (Aggregation) and hence cannot be a Value > Object ... However in our domain if the engine cannot be swapped out and > hence makes no sense without a car then it can be modeled as a Value Object > (Composition). Does this make any sense ? > > Please let me know what you think > > Thanks > > >