• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Whizlabs question on Proxy Design Pattern

 
Denise Advincula
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to analyze this question multiple times and I still didn't get why the answer is proxy... I've always answered Chain of Responsibility here but well, it's wrong. Any thoughts?


You are currently designing your own Desktop Publishing application as you have not found any existing application that does exactly what you want. As part of the design, you are using a Controller to which you send all GUI requests. Not all objects can process the same commands.

For example, you cannot select the spell check tool when an image has the focus. To stop any possible errors, you would like to filter out some of the messages as they are passed from these objects to the Controller object. What pattern could you use?

Choices:
Firewall
Proxy
Adapter
Observer
Chain of Responsibility
Filter


At one read, I'll also answer it with Intercepting Filter but it's not in the choices. So.. in this particular scenario, where is the proxy object?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34965
377
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wouldn't answer proxy either. I double checked the definition of proxy and see nothing that relates to this scenario.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic