For example I use SomeFramework which have mechanism to deal with controllers/actions. And I want to write MyService some methods of which depend on current action name.
Obviously I can do relation in MyService on MechanismInterface provided by SomeFramework.
But will it be better if I will create an interface ActionResolver and its implementation SomeFrameworkActionResolver?
SomeFrameworkActionResolver will depend on MechanismInterface, but MyService will depend on ActionResolver interface.
Aucun commentaire:
Enregistrer un commentaire