File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

J2EE Pattern - Enthuware Mock Exam

 
Neil Muya
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Saloon Keeper
Pie
Posts: 2173
57
Android Chrome Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic