File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Problem with some more pattern questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Problem with some more pattern questions " Watch "Problem with some more pattern questions " New topic
Author

Problem with some more pattern questions

muthulingam Jayakanthan
Ranch Hand

Joined: Feb 27, 2005
Posts: 43
I wnt through some articles from informit.com and also referred some definition detials from sun, but still i am struggling with the question. please give your answer if you can give some explanation y?

Q1: A developer designing a multi-tier web application and discovers a need to log each

incoming client request.
Which two patterns, taken independently, provide a solution for this problem?
(Choose two)

A. Transfer Pattern
B. Service Locator
C. Front Controller
D. Intercepting Filter
E. Business Delegate
F. MVC

My Answer : ?

Q2: A devdeloper is designing a web application that makes many fine-grained remote data

request for each client request. During testing, the developer discovers that the volume of

remote requests significanlty degrades performance of the application.
Which design pattern provides a solution for this problem?

A. Flyweight
B.Transfer Object
C. Service Locator
D. Dispatcher View
E. Business Delegate
F.MVC

My Answer : ?


Q: The comapny hired outside consultant to develop their web application. To finish the job

quickly, the consultant created several dozen JSP pages that directly communicate with the

database. The Company team has since purchased a set of business object to model their

system, and the Company developer charged with maintaining the web application must now

refactor all the JSPs to work with new System.
Which pattern can the developer use to solve this problem?

A.Transfer Object
B Service Locator
C.Intercepting Filter
D.Business Delegate

My Answer : ?

Q: A developer is designing a web application that must support multiple interfaces,

including:
* an XML web service for B2B
* HTML for web-based client
* WML for wireless customers

Which design pattern provides a solution for this problem?

A. Session Fascade
B. Business Delegate
C. Data Access Object
D. MVC
E. Chain of Responsibility


Answer :
srinath anand
Ranch Hand

Joined: Nov 20, 2001
Posts: 30
Hi,

According to me the answers to the questions are as follows:

=============
I wnt through some articles from informit.com and also referred some definition detials from sun, but still i am struggling with the question. please give your answer if you can give some explanation y?

Q1: A developer designing a multi-tier web application and discovers a need to log each

incoming client request.
Which two patterns, taken independently, provide a solution for this problem?
(Choose two)

A. Transfer Pattern
B. Service Locator
C. Front Controller
D. Intercepting Filter
E. Business Delegate
F. MVC

My Answer : Intercepting Filter and Front Controller since these 2 patterns deal with incoming requests and different ways of processing them.

Q2: A devdeloper is designing a web application that makes many fine-grained remote data

request for each client request. During testing, the developer discovers that the volume of

remote requests significanlty degrades performance of the application.
Which design pattern provides a solution for this problem?

A. Flyweight
B.Transfer Object
C. Service Locator
D. Dispatcher View
E. Business Delegate
F.MVC

My Answer : The ideal pattern for this will be Transfer Object since that reduces network traffic, the downside however is stale data.


Q: The comapny hired outside consultant to develop their web application. To finish the job

quickly, the consultant created several dozen JSP pages that directly communicate with the

database. The Company team has since purchased a set of business object to model their

system, and the Company developer charged with maintaining the web application must now

refactor all the JSPs to work with new System.
Which pattern can the developer use to solve this problem?

A.Transfer Object
B Service Locator
C.Intercepting Filter
D.Business Delegate

My Answer : This is tricky since none of them seem to match exactly. I would say Business Delegate - Any comments ?

Q: A developer is designing a web application that must support multiple interfaces,

including:
* an XML web service for B2B
* HTML for web-based client
* WML for wireless customers

Which design pattern provides a solution for this problem?

A. Session Fascade
B. Business Delegate
C. Data Access Object
D. MVC
E. Chain of Responsibility


Answer : If multiple user interfaces are needed for the same application which is what I am assuming here then MVC is the answer.

================================
Intercepting Filter and Front Controller since these 2 patterns deal with incoming requests and different ways of processing them.


SCJP2,SCWCD 1.4
muthulingam Jayakanthan
Ranch Hand

Joined: Feb 27, 2005
Posts: 43
Hi Srinath,
Thanks for your answers, I had the same answers in my mind and need to make sure I am right. I referred www.j2eecertificate.com also, but they still with the 310-080 syllabus, which expired now but all the questions regarding very useful there. Thanks for your help.
 
Consider Paul's rocket mass heater.
 
subject: Problem with some more pattern questions
 
Similar Threads
front contoller and intercepting filter
Library dependecies and design pattern doubts
I have one about design pattern
Mock Exam Doubts
Please answer me this question.