Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Value object pattern

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why has the value object pattern been renamed to Transfer Object ?
I also see many other patterns been renamed.
Thanks in advance.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The issue was that Martin Fowler's crew had used the name "Value Object" to describe a slightly different pattern than what Sun decided to call its own pattern, recently renamed to "Transfer Object" pattern.
Martin Fowler's description of "Value Object":
A small simple object, like money or a date range, whose equality isn't based on identity.
Martin Fowler's description of "(Data) Transfer Object":
An object that carries data between processes in order to reduce the number of method calls.
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer. I was confused regarding this since last week and had arguments with my friends as well .
Nice to have you here!
Martin Flowers value object is supposed to be immutable. Am I right?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Martin Flowers value object is supposed to be immutable. Am I right?

I'm not sure whether he has explicitly said it out loud, but I think most people would suggest making Value Objects immutable.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic