This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cade's book OrderListVO and OrderTO

 
Loga Nathan
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In Cade's sample application for Review Order Sequence (page 149), he uses an OrderListVO and OrderTO. He could use the OrderTO in a list, isn't it, why create an OrderListVO when that does not have any additional attributes? Also why use a VO and TO terminology, from what I understand a VO is an old name for TO?

Thanks.
 
Ramon Gill
Ranch Hand
Posts: 344
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Loga,
The diagram is on page 176 in my book. You're right about VO being an old name for TO. Cade uses VO because its a fairly old book.

Cade is using a SLSB which is why he doesn't have any extra attributes in the OrderListVO.

Ray
 
Loga Nathan
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ramon, I'm trying to figure out why Cade did not use a list of OrderTO but instead created a new OrderListVO.

I can see an OrderListVO will be needed if the list itself has some general property(attributes) that concerns the entire list but if not for that he could create a list (eg: ArrayList) of OrderTOs why go for a separate OrderListTO or VO is what I'm wondering about?

OrderListVO orderList = new OrderListVO();

or
ArrayList orderList = new ArrayList();
orderList.add(new OrderTO());

Is it necessary to create a separate listVO? There seems to be no right or wrong answer, any opinions please?
 
Ramon Gill
Ranch Hand
Posts: 344
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it to cut down on the amount of data transferred over the network?

Ray
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic