aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes J2EE Pattern - Enthuware Mock Exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "J2EE Pattern - Enthuware Mock Exam" Watch "J2EE Pattern - Enthuware Mock Exam" New topic
Author

J2EE Pattern - Enthuware Mock Exam

Neil Muya
Ranch Hand

Joined: Oct 26, 2009
Posts: 30
Hi Ranchers,

I just encountered a question with regards to J2EE patterns:

Here is the question:

"ABC, Inc. wanted to create a web application very quickly to demonstrate to their clients. For a fast turnaround of the application, the developers created some JSP pages that communicated directly with the database. Once the demo was over, ABC, Inc. hired a separate company to model their business domain and to develop business components. The JSP developers were asked to adapt their JSP pages to the third party developed business components.Which of the following patterns should the JSP developers use?"

My answer was "MVC".
What triggered me to answer MVC was this line
"developers created some JSP pages that communicated directly with the database".

I thought separating the View from directly communicating with the database,
and let the Model handle it would have solve the problem.

But I was wrong. Answer was "Business Delegate".

Part of the Explanation was:
"This patterns suit the situation because the JSP developers can utilize a business delegate to perform business tasks instead of going to the DB. The business delegate can then integrate with the business components developed by third party."


Question is , what part of the scenario did MVC did not achieve?


Thanks in Advance!



Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1696
    
  25

Hi Neil,

I made the same mistake with this question. The thing to notice here is that there is nothing about a Controller in the description.
The JSP developers were asked to adapt their JSP pages to the third party developed business components

The View makes direct use of a Business Delegate.

These questions, for me, remain difficult because it would be logical to have a controller in this application. Use Peabody's document on the patterns (SCWCD links)

Regards,
Frits
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: J2EE Pattern - Enthuware Mock Exam