You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I investigate how you work with Action. I think there should be some improvements. My idea is that Action storage can be service provider. There is ActionFactory class which has function to create instance of Action.
I think it will be better to have ActionFactory as IActionFactory without implementation. Or implementation with dictionary can be default implementation. But if someone needs to another factory (ie from service provider) you can create new implementation IActionFactory.
Second problem is that input parameter is pass through constructor of ActionBase. I think input parameters can be passed by method or properties in ActionBase class, or better - through interface IParametrizedAction. Or there is possibility to use Visitor pattern to give developer possibility to set up parameters into Action by his way.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I investigate how you work with Action. I think there should be some improvements. My idea is that Action storage can be service provider. There is ActionFactory class which has function to create instance of Action.
I think it will be better to have ActionFactory as IActionFactory without implementation. Or implementation with dictionary can be default implementation. But if someone needs to another factory (ie from service provider) you can create new implementation IActionFactory.
Second problem is that input parameter is pass through constructor of ActionBase. I think input parameters can be passed by method or properties in ActionBase class, or better - through interface IParametrizedAction. Or there is possibility to use Visitor pattern to give developer possibility to set up parameters into Action by his way.
Do you think it is possible?
Beta Was this translation helpful? Give feedback.
All reactions