jeudi 26 février 2015

2 methods that are 75% the same?


I have code that violates the DRY principle and I would like to consolidate 2 methods as much as I can, but the problem I am facing is that they have some differences, I would say they are about 75% the same, but the other 25% is different in certain areas. What kinds of design patterns or design approaches can I do to turn 2 methods into 1 or at least limit the code needed in each, so that they become more scalable and maintainable?





Aucun commentaire:

Enregistrer un commentaire