Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubts in design pattern

 
naresh govindaswmay
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
naresh govindaswmay
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
Thanks

Thanks and regards
naresh govindaswamy
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic