Skip to Content
Working Effectively with Legacy Code
book

Working Effectively with Legacy Code

by Michael Feathers
September 2004
Intermediate to advanced
464 pages
10h
English
Pearson
Content preview from Working Effectively with Legacy Code

Chapter 25: Dependency-Breaking Techniques

In this chapter, I’ve written up a set of dependency-breaking techniques. This list is not exhaustive; these are just some techniques that I’ve used with teams to decouple classes well enough to get them under test. Technically, these techniques are refactorings—each of them preserves behavior. But unlike most refactorings written up in the industry so far, these refactorings are intended to be done without tests, to get tests in place. In most cases, if you follow the steps carefully, the chance of mistakes is small. This doesn’t mean that they are completely safe. It is still possible to make mistakes when you perform them, so you should exercise care when you use them. Before you use these refactorings, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Clean Code: A Handbook of Agile Software Craftsmanship

Clean Code: A Handbook of Agile Software Craftsmanship

Robert C. Martin

Publisher Resources

ISBN: 0131177052Publisher Support