• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

J2EE Pattern - Enthuware Mock Exam

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!



 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic