A strategy class is applied depending when a certain condition is met. The strategy is 'chosen' as it were. Strategy pattern 101.
But what if there is a group of classes that are all applied based on the same condition. Conceptually, you can point to the group of classes and call the whole group the strategy, but that relationship is not explicit and more to the point, the logic inside those classes are isolated precisely so they don't know each other. They just happen to apply to invoke on the same condition.
Is there a name for this? I'm leaning towards Strategy Pattern with a simple separation of concerns applied to it (SRP, high cohesion), but I'm not sure.
Aucun commentaire:
Enregistrer un commentaire