0

missair - 博客园

 3 years ago
source link: https://www.cnblogs.com/missair/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
missair - 博客园

2010年10月22日 #

 

  1. Duplicated Code
    1. In a class: Extract Method
    1. Sibling classes:
  • Extract Method -> Pull Up Method(superclass)
  • Extract Method -> Form Template Method
  • Substitute Algorithm
  1. Extract Class
  1. Long Method (Comments)
    1. Extract Method
    1. Replace Temp with Query
    1. Introduce Parameter Object/Preserve Whole Object
    1. Replace Method with Method Object
    1. Decompose Conditional
  1. Large Class
    1. Extract Class
    1. Extract Subclass
    1. Extract Interface
    1. Duplicate Observed Data (GUI class)
  1. Long Parameter List (Dependency structure)
    1. Replace Method with Method Object
    1. Preserve Whole Object
    1. Introduce Parameter Object
  1. Divergent Change
    1. Extract Class (Strategy/Visitor/Self Delegation)
  1. Shotgun Surgery
    1. Move Method/ Move Field
    1. Inline Class
  1. Feature Envy
    1. Move Method
    1. Extract Method -> Move Method
  1. Data Clumps
    1. Extract Class
    1. Introduce Parameter Object/ Preserve Whole Object
  1. Primitive Obsession
    1. Replace Data Value with Object
    1. Replace Type Code with Class/Replace Type Code with Subclass/Replace Type Code with State/Strategy
    1. Extract Class
    1. Introduce Parameter Object
    1. Replace Array with Object
  1. Switch Statements (Polymorphism)
    1. Extract Method
    1. Move Method
    1. Replace Type Code with Subclass/Replace Type Code with State/Strategy
    1. Replace Conditional with Polymorphism
    1. Replace Parameter with Explicit Methods
    1. Introduce Null Object
  1. Parallel Inheritance Hierarchies (Shotgun Surgery)
    1. Move Method
    1. Move Field
  1. Lazy Class
    1. Collapse Hierarchy
    1. Inline Class
  1. Speculative Generality
    1. Collapse Hierarchy (abstract class)
    1. Inline Class (delegation)
    1. Remove Parameter
    1. Rename Method
  1. Temporary Field
    1. Extract Class
    1. Introduce Null Object
  1. Message Chains (structure of navigation)
    1. Hide Delegate
    2. Extract Method
    1. Move Method
  1. Middle Man (encapsulation/delegation)
    1. Remove Middle Man
    1. Inline Method
    1. Replace Delegation with Inheritance
  1. Inappropriate Intimacy
    1. Move Method/Move Field
    1. Change Bidirectional Association to Unidirectional
    1. Extract Class
    1. Hide Delegate
    1. Replace Inheritance with Delegation
  1. Alternative Classes with Different Interfaces
    1. Rename Method
    1. Move Method
    1. Extract Superclass
  1. Incomplete Library Class
    1. Introduce Foreign Method
    1. Introduce Local Extension
  1. Data Class
    1. Encapsulation Field
    1. Encapsulation Collection
    1. Remove Setting Method
    1. Move Method
    1. Extract Method
    1. Hide Method
  1. Refused Bequest
    1. Replace Inheritance with Delegation
  1. Comments
    1. Extract Method
    1. Rename Method
    1. Introduce Assertion

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK