No older revisions available
No older revisions available
1. Chapter 12 Big Refactorings ¶
1.1. Tease Apart Inheritance ¶
- You have an inheritance hierarchy that is doing two jobs at once.
Create two hierarchies and use delegation to invoke one from the other.
1.2. Convert Procedural Design to Objects ¶
- You have code written in a procedural style.
Turn the date records into objects, break up the behavior, and move the behavior to the objects.
1.3. Separate Domain from Presentation ¶
- You have GUI classes that contain domain logic.
Separate the domain logic into separate domain classes.
1.4. Extract Hierarchy ¶
- You have a class that is doing too much work, at least in part through many conditional statements.
Create a hierarchy of classes in which each subclass represents a special case.