Complex refactoring in simple steps Part I

01 Sep 2016

SC London
The place where passionate Software Craftspeople, Community, Experts & Thought Leaders come together
Book your ticket now!

Screencast - Complex refactoring in simple steps, Part I: 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

Related Blogs

Get content like this straight to your inbox!

Codurance Logo

Software is our passion.

We are software craftspeople. We build well-crafted software for our clients, we help developers to get better at their craft through training, coaching and mentoring, and we help companies get better at delivering software.

Latest Blogs




Contact Us

3 Sutton Lane
London EC1M 5PU

Phone: +44 207 4902967

2 Mount Street
Manchester M2 5WQ

Phone: +44 161 302 6795

Carrer de Pallars, 99
08018, Barcelona

Phone: +34 937 82 28 82

Email: hello@codurance.com