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 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.