Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Design patterns options in EPractice Lab mock exam 1

Ranch Foreman
Posts: 1922
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EPractice Lab mock exam 1:

17. A developer has created a web application that includes a servlet for each use case in 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
The given answers are C and F.
The front controller pattern is a software design pattern listed in several pattern catalogs. The pattern relates to the design of web applications. It "provides a centralized entry point for handling requests." The MVC pattern separates the modeling of the domain, the presentation, and the actions based on user input into 3 separate classes:
Model: the model manages the behavior and the data of the application domain, responds to requests for information about its state (usually from the view) and responds to instructions to change state(usually from the controller).
View: the view manages the display of information.
Controller:the controller interprets the mouse and keyboard inputs from the user, informing the model and / or the view to change as appropriate.

I think the answers are C and E instead.
Since the serlvets are difficult to maintain and request processing methods are large, we can use a business delegate to delegate the implementations of request processing to the business logic layer.
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic