Appendix D. Key Refactorings

These UML diagrams are before-and-after representations for some important refactorings. See Fowler et al., Refactoring: Improving the Design of Existing Code, for a full catalog of transformations and the steps that will let you safely apply them.

Change Bidirectional Association to Unidirectional

Change Bidirectional Association to Unidirectional

Duplicate Observed Data

Duplicate Observed Data

Extract Class

Extract Class

Extract Method

Move Field

Move Method

Replace Type Code with State/Strategy

Get Refactoring Workbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.