Unique Value Object vs Entity
Trying to convert some entities into value objects I am stuck in a case where what seems a value object must be unique within an aggregate.
Shouldn’t Location be a Value Object?
Eric Evan’s DDD book, Cargo Shipping Example, pg. 168:
Modeling value object when fields’ existence depends on state of other fields
I am practicing tactical DDD and having trouble as exemplified below. Fundamentally, whether some fields of the value object should be nullable depends on another field of the same value object. Consider the following value object and enum (C#):
Modeling value object when fields’ existence depends on state of other fields
I am practicing tactical DDD and having trouble as exemplified below. Fundamentally, whether some fields of the value object should be nullable depends on another field of the same value object. Consider the following value object and enum (C#):
DDD: big immutable item with some references to entity identifiers, should it be object value or entity?
Let’s say I have a Mail
, this mail have many properties given by the constructor (for example, 10-15 parameters).
This mail can’t be edited (immutable), the user has specifically requested to send this content. Mail has no methods but multiple constructors (for managing different scenarios), and it has few references on other entity identifiers (for example a reference on the identifier of the sender and the receiver).
Should Value Objects be used inside the DTO?
After reading about Value Objects, I think they’re pretty cool and should be used, but I am not sure if I am doing it the right way.
Use a custom value object or a Guid as an entity identifier in a distributed system?
tl;dr I’ve been told that in domain-driven design, an identifier for an entity could be a custom value object, i.e. something other than Guid, string, int, etc. Can this really be advisable in a distributed system? Long version I will invent an situation analogous to the one I am currently facing. Say I have a […]
Use a custom value object or a Guid as an entity identifier in a distributed system?
tl;dr I’ve been told that in domain-driven design, an identifier for an entity could be a custom value object, i.e. something other than Guid, string, int, etc. Can this really be advisable in a distributed system? Long version I will invent an situation analogous to the one I am currently facing. Say I have a […]
DDD – If an object is saved as a whole to the database, is it per definition an entity, or is it still possible that it is a value object?
I’m learning about Domain Driven Design and struggling with the question if a particular object should be handled as entity or value object.
DDD – If an object is saved as a whole to the database, is it per definition an entity, or is it still possible that it is a value object?
I’m learning about Domain Driven Design and struggling with the question if a particular object should be handled as entity or value object.