Value object obsession

added by JefClaes
9/16/2012 12:33:14 PM

0 Kicks, 49 Views

Primitive obsession is one of the more popular (hyped?) code smells these days. The antidote is creating a value object instead of using a primitive. A value object is an immutable object which (in its DDD definition) carries no identity, but is compared based on the value of its attributes. While primitive obsession is still very much the standard, newer projects seem to regularly suffer from the other extreme; introducing value objects as the de facto standard.


0 comments