• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

design patterns

 
dx wu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A developer has created a web application that includes a servlet for each use case int the application.These servlets have become rather difficult to maintain because the request processing methods have become very large.There is also common processing code in many servlets because these use cases are very similar.

Which two design patterns can be used together to refactor and simplify this web application?
A.Proxy
B.View Helper
C.Front Controller
D.Session facade
E.Business Delegate
F.MVC

I select C and F, correct?
 
Rodrigo Dinis
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear,
after read the question I saw that the answer is structural patterns: Front Controller to center the application control (struts suits good here) and MVC to divide the view to jsp instead in the servlet. I think you are right.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing has been mentioned about the view, so MVC can be left out.
1. Front Controller to route the different requests.
2. Business delegate as there is plenty of common code.

My answers would be : C and E

Rodrigo: We don't usually use both Front Controller and MVC patterns together. (MVC does Front Controller's job of routing the requests/actions and also has views associated with it).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic