Chapter 5. Toward a Catalog of Refactorings

Chapters 5 to 12 form an initial catalog of refactorings. They’ve grown from the notes I’ve made in refactoring over the last few years. This catalog is by no means comprehensive or watertight, but it should provide a solid starting point for your own refactoring work.

Format of the Refactorings

As I describe the refactorings in this and other chapters, I use a standard format. Each refactoring has five parts, as follows:

• I begin with a name. The name is important to building a vocabulary of refactorings. This is the name I use elsewhere in the book.

• I follow the name with a short summary of the situation in which you need the refactoring and a summary of what the refactoring does. This helps you ...

Get Refactoring: Improving the Design of Existing Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.