Why I need to use Chain of responsibility, if I could load all commands into some container and just execute commands one by one. This will make a chain of processing a request in a row. BTW I feel that it is better than CoR because you can remove some particular commands or replace with another command on runtime, whereas for CoR you need to create another chain to change something in the chain as you don't have assess to elements in the chain except the first element. (It is, actually, a single linked list.)
Aucun commentaire:
Enregistrer un commentaire