Complex Refactoring in Simple Steps Part 1: Replace Method with Method Object

Описание к видео Complex Refactoring in Simple Steps Part 1: Replace Method with Method Object

Matthew Butt demonstrates how to compose simple automated refactoring steps in ReSharper to refactor code to better designs.

In this episode, we look at a method that exhibits the Long Parameter List and Data Clump smells. We Extract Class from Parameters to create a parameter object, and then, spotting Feature Envy, use Move Instance Method to shift the behaviour to the new class. We finish by tidying up the method object to remove generated code that might tempt us to break encapsulation.

The code used in this video can be found on GitHub at https://github.com/bnathyuw/Complex-R...

Комментарии

Информация по комментариям в разработке