Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

enthuware question  RSS feed

 
Raghavendra Harapanahalli
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have taken over an old web application that contains a servlet for each use case. These servlets have become difficult to maintain because the service methods have grown big. Also,since the use cases are similar, lot of code has been repeated accross the servlets.
Which patterns can you apply in this situation?

a Business Delegate
b Transfer Object
c Front Controller
d Session Facade
e Model View Controller

the answer is given as a and c, but i feel it is c and e.
can anyone clarify?
 
Joy Mukherjee
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The correct answer is Business Delegate and Front Controller.

Business Delegate-: Because all the look up code can be centralized in the Business Delegate/Service Locator.


Front Controler: Can be used for Centralized control and delegation.

MVC is not the best choice because its more associated with different types of views for the same controller and underlying model components.
Best example can be an application which may have a Java Swing Client and Java Web Client.

Thanks and Regards
Joy
 
Ericson James
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd recommend you look at Marc Peabody Design Pattern notes for the exam. This is the only thing I read and it got me through
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!