Archive pour mars 2014

Value Objects

Look at that : http://www.infoq.com/presentations/Value-Objects-Dan-Bergh-Johnsson

From first part, I’ll retain :

Candidates for Domain Logic Value Objects :

Strings with format limitations – eg:

  • Name
  • OrderNumber
  • Zipcode

Integers with limitations – eg:

  • Percentage with a range of 0-100%
  • Quantity (>= 0)

Explicit methods arguments/return – eg:

  • Double becomes Price
  • Map<String,List<String>> becomes LoggingAttempts

Second part goes high… I di not grasp the whole thing – YET !

Pas de commentaire