gang-of-4-patterns AT lists.siebelschool.illinois.edu
Subject: Design Patterns discussion
List archive
- From: "Chris Finlayson" <cfinlayson AT vls-inc.com>
- To: <gang-of-4-patterns AT cs.uiuc.edu>
- Subject: [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern
- Date: Wed, 5 Nov 2003 15:25:37 -0700
- Importance: Normal
- List-archive: <http://mail.cs.uiuc.edu/pipermail/gang-of-4-patterns/>
- List-id: Design Patterns discussion <gang-of-4-patterns.cs.uiuc.edu>
Hello everyone,
It seems to me that the Strategy Pattern and Bridge Pattern are equivalent
both in intent and implementation, therefore I must have a
misconception....I was hoping if someone could help clarify my
understanding.
Let's focus on the application of a strategy pattern as applied to sorting.
Assume I have a few sorting algorithms that do the same thing...take in
numbers, sort, then spit out numbers. Therefore, I could have:
1. ISortStrategy - the interface to the concrete strategies
2. QuickSortStrategy - A concrete sort strategy that implements
ISortStrategy
3. MergeSortStrategy - Another concrete sort strategy that implements
ISortStrategy
etc....
Now, in the context of the program that's calling the concrete strategies,
it instantiaties an ISortStrategy (maybe via a factory with the proper
argument as to whether to use a QuickSort, MergeSort, etc.).
Now, I see this as identifical to the Bridge pattern....where the
ISortStrategy is the abstraction and the concrete sort strategies are the
implementations. What am I missing?
Thanks!
--Chris.
- [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Chris Finlayson, 11/05/2003
- Re: [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Wayne Cannon, 11/06/2003
- RE: [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Paul Adolph, 11/06/2003
- RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, ziane, 11/06/2003
- RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Paul Adolph, 11/06/2003
- RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Mikal Ziane, 11/07/2003
- RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Paul Adolph, 11/06/2003
- RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, ziane, 11/06/2003
- RE: [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Paul Adolph, 11/06/2003
- Re: [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Wayne Cannon, 11/06/2003
- <Possible follow-up(s)>
- RE: [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Ray Ye, 11/06/2003
- RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Mikal Ziane, 11/06/2003
- RE: RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Chris Finlayson, 11/06/2003
- RE: RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, David Rosenstrauch, 11/06/2003
- RE: RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Chris Finlayson, 11/06/2003
- RE : [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Mikal Ziane, 11/06/2003
- Re: [gang-of-4-patterns] Strategy Pattern vs. Bridge Pattern, Wayne Cannon, 11/06/2003
Archive powered by MHonArc 2.6.16.