• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A mock question about Business Delegate pattern

 
avseq anthoy
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the benefits of using Business Delegate pattern?




Select 3 correct options
a It shields the clients from the business rule changes.

b It allows the clients to access the business services using any technology like EJB, CORBA or RMI.

c It shields the clients from changes in the implementation of the business services.

d It provides a uniform interface to the clients.

e It improves performance by caching the data.

answer:c,d,e

But I think answer is a,c,d.
Can someone correct me if I am wrong,and explain it for me.
Thx!!
 
Alec Lee
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"a It shields the clients from the business rule changes. "
I would choose "false" because Biz Delegate's concern is to hide the remoteness of model components. Client sill need to concern about the biz rule the model components provide and change accordingly if the rule changes affect how data should be present.

"b It allows the clients to access the business services using any technology like EJB, CORBA or RMI. "
Seems to be true. At least client can tranparently use either EJB or RMI (with all the details shielded by the biz delegates). I know little about CORBA. Not sure what is required to use it. Can an ordinary servlet invoke a CORBA business component?

c It shields the clients from changes in the implementation of the business services.
true
d It provides a uniform interface to the clients.
This statement is vague (as with many mock question related to patterns)! Uniform from which perspective? If we're talking about different implementation type of business service. Client can invoke them all through a single set of interface without bothering how remote service is invoked. Can this be considered "provides a uniform interface to the clients"? But, of course, calling service A would require API of A while calling service B would require API of B. This is not a uniform interface!

So I dont know about this.

e It improves performance by caching the data.
yes, we can cache result in biz delegate (according to core J2EE pattern although not much emphasized by HFS).
 
avseq anthoy
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply!
It is very helpful for me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic