• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cade's book OrderListVO and OrderTO

 
Loga Nathan
Greenhorn
Posts: 21
  • 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
  • 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
  • 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
  • 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
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!