File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Value object pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Value object pattern" Watch "Value object pattern" New topic
Author

Value object pattern

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Why has the value object pattern been renamed to Transfer Object ?
I also see many other patterns been renamed.
Thanks in advance.


Groovy
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

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

Joined: Jan 23, 2002
Posts: 11962
    
    5
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Value object pattern