Tutorials

Design Patterns - Strategy and Bridge

by John Kleijn on Oct 9, 2008 9:51:16 AM

Introduction

The Strategy and Bridge patterns provide solutions to apply polymorphism in more flexible way than you can accomplish with only inheritance.

The patterns are almost identical, differing mostly in intent only. Though it is this difference that create implementation variations targeting the respective problems.

Problem

Strategy
How to use different algorithms in a flexible, polymorphic way.

Bridge
How to structurally abstract a varying concept and it's implementations, in a way that doesn't break encapsulation.

Comments

True true

1. S N on Nov 29, 2008 11:27:54 PM

Good stuff.

2. Josh Robison on Dec 2, 2008 8:35:11 PM

thank you..

3. Nous on Dec 5, 2008 1:18:30 AM

Interesting example, tho IMO overkill for an 'emailer' class. Explains the concept well though.

4. Nabeel on Jan 2, 2009 7:02:45 PM
Login or register to post a comment.