• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Value Object & Facade

 
R K Singh
Ranch Hand
Posts: 5384
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is que from Podar
========
Question 51
___________ pattern enables improved network traffic and response time. Fewer remote calls are made and less data is passed back and forth
A Value Objects
B Data Access Objects
C Fa´┐Żade
D Business Delegate
========
Ans is Value object.
But I think Value object does not transmit less data as data is simply put together in a Value object.
I think answer is Facade as it reduces n/w traffic and also there is less data transer over network as workflow is taken care at server.
Correct me if I am wrong ..
TIA
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravish,

this question has a strong ejb background. Every method call to an ejb, be it an entity bean or an session bean produces overhead (more a strong feeling than actual knowledge). If it is actually network overhead, well thats a different question.
If you have a session bean as a facade which calls various getter/setters of an entity bean. In EJB1.1 you use RMI-IIOP semantics for communication, even if both the session bean and the entity bean are co-located in the same JVM. The server dosen't necesarily use RMI-IIOP to realize that calls for performance reasons. In EJB2.0 there are special local component interfaces, which make this optimization option part of the specification.
So there is not necesarily network overhead. But I strongly believe that every entity bean call contrives s.o.m.e overhead. So its better to collect all values you want to retrieve from the entity bean in o.n.e value object and return it to the session bean which returns it to the client/servlet.
Any more comments? I think I am missing some important informations.
---
Axel
SCJP2
IBM Certified Websphere Specialist (158)
like that: don't trust me, find the truth
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic