Skip to Content.
Sympa Menu

gang-of-4-patterns - [gang-of-4-patterns] Where to build the Bridge?

gang-of-4-patterns AT lists.cs.illinois.edu

Subject: Design Patterns discussion

List archive

[gang-of-4-patterns] Where to build the Bridge?


Chronological Thread 
  • From: Roy Varghese <roy2000 AT gmail.com>
  • To: gang-of-4-patterns AT cs.uiuc.edu
  • Subject: [gang-of-4-patterns] Where to build the Bridge?
  • Date: Fri, 3 Dec 2004 23:12:55 -0800
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=RKNptyfXdzbgXhrwuGWRuDd0p8xwaUV/bF4FK2axFk81Yo4Iub9rkYK4dUbnOWzA58ezOiFzr04OrtjZasLTm+qhyGxQY4NKxo93JzZ5o9ftlfoGpmT7CNJ8xto0acD9Ymrzchkk6skq28PNRFogwHquBM6s63H1VBtWfjSX8Ek=
  • List-archive: <http://mail.cs.uiuc.edu/pipermail/gang-of-4-patterns>
  • List-id: Design Patterns discussion <gang-of-4-patterns.cs.uiuc.edu>

Hi all

I am trying to understand how best to use the bridge pattern. The
example in this chapter show PMWindowImp and XWindowImp as concrete
classes that implement the WindowImp interface.

IconWindow, derived from Window uses the interface provided by
WindowImp to provide the refined abstraction. Now what happens if
IconWindow wants to do something that is not do-able by just using the
WindowImp interface, say it wants to make the icon blink, and
blinkIcon() is not a WindowImp operation.
a) Should IconWindow provide override its own implementation, i.e
create another bridge to IconWindowImp, or
b) Should the bridge not have been done at the Window level in the
first place, i.e. should the bridge be always built at the class from
which only refinements are possible, not extensions.

In fact, I note that in the book it talks about IconWindow as a
RefinedAbstraction, which somehow implies that IconWindow uses only a
interfaces provided by Window to do its work.

Thanks for your responses!

-Roy

--
--><8---Profound quote snipped by email server--><8---.




  • [gang-of-4-patterns] Where to build the Bridge?, Roy Varghese, 12/04/2004

Archive powered by MHonArc 2.6.16.

Top of Page