I am trying to keep an eye on DDD, or at least my limited understanding.
I am having problems installing some things in DDD boxes.
Example: I have a User Entity. This custom Entity has a reference to the UserPreferencesInfo object - it's just a class that contains a bunch of properties regarding user preferences. These properties are fairly unrelated, except for the fact that they are all user preferences (as opposed to the VO address, where all properties form a complete whole).
Question: what is this UserPreferencesInfo object?
1) Obviously, this is not Entity (I just store it as a “component” in a quick nhibernate conversation (that is, in the same DB table as the user object).
2) VO? I understand that the Value object must be immutable (so you cannot remove them, but simply new ones). This makes sense when the object is, for example, an address (the properties of the address form a meaningful “integer”). But in the case of UserPreferencesInfo, I don’t think it makes sense. There can be 100 properties (realistic) There can be 20 properties on this object - why would I want to refuse to recreate the object whenever I needed to change one property?
It seems to me that I need to break the rules here to get what I need, but I do not really like the idea of this (this is a slippery slope!). Did I miss something?
thanks
source
share