Value Object vs Data Transfer Object
One of the main goals of design patterns is to have a names dictionary shared among professionals.
This dictionary, sometimes, has some trouble.
It’s the case of two well known design patterns: Value Object and Data Transfer Object.
Value Object, according to Martin Fowler, is defined as:
“A small simple object, like money or a date range, whose equality isn’t based on identity.”
But Value Object, according to SUN, was for some time defined as follows: “An object that carries data between processes in order to reduce the number of method calls.”
In the words of Fowler: “Many people in the Sun community use the term “Value Object” for this pattern. I use it to mean something else.” (Talking about Data Transfer Object)
Some time ago, Value Object pattern (SUN version), has been renamed to “Transfer Object” according to Fowler.
Question is exposed in a few lines by Fowler at following address: http://martinfowler.com/bliki/ValueObject.html
Comments
comments powered by Disqus