Card 22 / 24: Your Parcel delivery company is expanding it's existing web application. Currently the clients can track their parcels using web browsers, and your company wants to expose it's business to it's partners as web-services. However; when you inspected the code base, you discovered that the application passes HttpServletRequest parameters to the business tier for further processing. Your job is to refactor this existing code base to avoid duplicating the business logic to handle the two request channels (http and web service requests). Which refactoring is appropriate for this case without code duplication?
A)
Use front controller pattern
B)
Use context object pattern
C)
Use proxy pattern
D)
Use service broker pattern
Answer:
B) Use context object pattern
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|
Enterprise Java Design Patterns
Author:
JavaChamp TeamSenior Java Developer
QuizOver.com
Germany
Access: |