File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doubts in design pattern Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doubts in design pattern" Watch "doubts in design pattern" New topic
Author

doubts in design pattern

naresh govindaswmay
Ranch Hand

Joined: Aug 15, 2007
Posts: 90
hi,
I have red this qustion from javabeat site.
Business delegate pattern should be used to enable communication between the JSP code and the enterprise javabeans.
Options.
A.True
B.False
For this my answer is "B".Because Business delegate design pattern is "Reduces coupling between presentation and business tiers".In fourm they said "A" is the correct answer please any body explain me about this question.


Thanks and regars
NareshGovindaswamy



Thanks and Regards<br />Naresh govindaswamy
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Originally posted by naresh govindaswmay:
hi,
I have red this qustion from javabeat site.
Business delegate pattern should be used to enable communication between the JSP code and the enterprise javabeans.
Options.
A.True
B.False
For this my answer is "B".Because Business delegate design pattern is "Reduces coupling between presentation and business tiers".In fourm they said "A" is the correct answer please any body explain me about this question.


Thanks and regars
NareshGovindaswamy



Answer A is correct. Though you can directly connect the EJB through JSP. It is better to delegate the lookup codes and EJB access code from the JSP to business delegate. JSP meant for the presentation.

Thanks


Narendra Dhande
SCJP 1.4,SCWCD 1.4, SCBCD 5.0, SCDJWS 5.0, SCEA 5.0
naresh govindaswmay
Ranch Hand

Joined: Aug 15, 2007
Posts: 90
hi,
Thanks

Thanks and regards
naresh govindaswamy
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

I'd like to take that a step further and say that a JSP typically shouldn't be talking to a Business Delegate. In most cases, the controller class should be responsible for dealing with the Business Delegate(s) and then place some resulting data in request or session scope for the JSP to render for display.


A good workman is known by his tools.
Narendra Dhande
Ranch Hand

Joined: Dec 04, 2004
Posts: 950
Hi,

Yes. You are perfectly right. The Controller or View Helper will take this responsibility in the MVC design.

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: doubts in design pattern