lundi 16 février 2015

Is there a name for a design pattern in which I've an array of Strategies?

I was at my job this morning, doing something related to the Strategy design pattern, when I stumbled upon this question.


Let's say I need something like data validation but I need to validate different things. So, I decide to create different classes for each thing, implementing the Strategy pattern. Then, I need to run many validators over a set of data. So, I save'em in an array. This way, with the proper mutators, it is also possible to modify validation criteria at runtime by adding or dropping validator objects.


Is there a name for that? Is that considered a design pattern?


Just curiosity, by the way.


Aucun commentaire:

Enregistrer un commentaire