Tag Archive 'valueobject'

While Java 8 is coming, are you sure you know well the enums that were introduced in Java 5? Java enums are still underestimated, and it’s a pity since they are more useful than you might think, they’re not just for your usual enumerated constants! Java enum is polymorphic Java enums are real classes that [...]

This anti-pattern is about Using String instances all the time instead of more powerful objects. This is a special case of primitive obsession. Examples Here are some flavours of this anti-pattern: String as keys in a Map: I have seen calls to toString() on objects just to use their String representation as a key in [...]

Many concepts look obvious because they are used often, not because they are really simple. Small quantities that we encounter all the time in most projects, such as date, time, price, quantity of items, a min and a max… hardly are a subject of interest from developers « as it is obvious that we can represent [...]