Information générale
Catégorie:
Programmation Orientée Object
Thanks Andy,
I think the basis for our discussion was this line in the consequences section:
"It's even possible for an object to change its implementation at run-time."
You say this should not be done. When you do use a stategy, right?
Martin van Krieken
>Actually you will find that most design patterns either use, or are based on, the bridge. It is probably the most fundamental pattern. However, what really matters in the context of a pattern is the "Intent".
>
>You are correct in noting that the result of implementing a strategy pattern is actually a bridge. However, a Strategy is not static; the idea is that different objects can be used at one side of the bridge depending on circumstances. So the intent of the two patterns is quite different.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement