mercredi 30 décembre 2020

when refactoring using extract method, should you extract into a new class or into the current class?

I've been using extract method to make the flow of my code easier to understand, but now I have a load of these methods just dumped at the bottom of my class file. I've thought about creating individual classes for the methods or groups of them but I'm just worrying if that would be adding unnecessary complexity. Any tips for doing this elegantly would be appreciated.

Aucun commentaire:

Enregistrer un commentaire