mercredi 29 avril 2015

Use of ValueObjects

I am developing with Entity Framework (Database First and Code First). Most of the time, I am using entities in my domain models, mapped to dedicated tables. In DDD, there is the concept of ValueObjects, that should have no identity and should be immutable. Based on your experience with DDD, how do you use ValueObjects ? Is that a concept that emerges from creating the model (for instance, when it deals with read-only data, parameters...) or is there any strategic behaviour that is expected or deductible from stating that an object should be designed like a ValueObject (or not), or should be immutable (or not) ?

Many thanks,

Aucun commentaire:

Enregistrer un commentaire