Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock Q on Design Pattern

 
Reshma Shanbhag
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I came across this question on the j2eeCertificate.com.


Which design pattern would be suitable for this scenario?


You are designing a directory service to allow users to find business services in a specified location. You have a requirementthat the directory service can be accessed from both a web browser and a WAP enabled phone.

1 Business Delegate
2 Model-View-Controller
3 Service Locator
4 Data Access Object
5 Value Object


Given aswer is 2.)

I thought the answer would be 3.) as the selection was radio button. If it was checkbox would have selected 2.) and 3.)

I wanted to see if my approach for this design problem was right hence posting here.

The first part of the problem mentions of designing directory service. The second part says of the requirement stating that this directory service app should be accessed by various clients (web browser and a WAP ).
The second part consists of two things to be thought 1.) accessing directory service 2.) app should not be bound to a view type.


Ranchers please free to comment on my approach for this design question.

Thanks,
Reshma
[ June 03, 2006: Message edited by: Reshma Pai ]
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pretty misleading question. That aside, any question that mentions the need for multiple views will include MVC as an answer.
 
Reshma Shanbhag
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
so does it mean that MVC was a more appropriate answer than ServiceLocator for this ?
 
Nikhil Jain
Ranch Hand
Posts: 392
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are designing a directory service to allow users to find business services in a specified location. You have a requirementthat the directory service can be accessed from both a web browser and a WAP enabled phone.

-------------

I guess the question is stressing on the second part of the question. "You have a requirement thhe ... The first part merely gives a introduction about the design.

but still the question seems to be misleading!!
 
Cai DongShan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Service Locator is not suitable design pattern for this case.

In this case, Business services is not business Delegate components, is actual business. Users need a map between the business and the location, not the software component inside the system.

Service Locator is to work with a variety of registries such as: JNDI, RMI, UDDI, and COS naming. It is not applicability for this case.

So the only issue is multiple display interfaces, we use the design pattern MVC for it.
 
wise owen
Ranch Hand
Posts: 2023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Agree with Cai.

You have a requirement that the directory service can be accessed from both a web browser and a WAP enabled phone.

This is the main point of the question.
 
Reshma Shanbhag
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cai DongShan,

The analysis of the problem from you was extremely helpful and answers all my doubts.

Thanks,
Reshma
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic