Re: How to identify if a concept should be represented as a entity or as a value obj
Giacomo Tesio <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAHL7psFq10GEVZdFCL8=_vtRzcjuLwdsqMykfQn+EzaE=swvOw@mail.gmail.com> |
I model entities after the expert's language, when he talks with his own peers he use a name to identify an entity while he describes value objects. For example, in a financial application he could use the RIC or the ISIN to identify an entity, but he doesn't identify a monetary amount. Giacomo On Mon, Feb 25, 2013 at 5:58 AM, Remy Fannader <[email protected]> wrote: > ** > > > 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 >> >> > >