啃技术的虫子

技术连接梦想与现实...

博客园 首页 新随笔 联系 订阅 管理
 
  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
posted on 2010-10-22 19:36  missair  阅读(336)  评论(0编辑  收藏  举报