Helper class(es) vs functional inheritance. Best practice
- by Andrew Florko
I have commands classes that implement ICommand { Execute } interface. Several commands have duplicate pieces of code. I have several options how to DRY:
Create static helper class(es) and move duplicate code there
Create commands inheritance with protected helper methods
What would you suggest and why?
Thank you in advance!