- Enterprise ประกอบด้วย
1.1) Eliminate Inter-Entity Bean Communication
1.2) Hide Delegate
1.3) Hide presentation tier-specific details from the business tier
1.4) Introduce A Controller
1.5) Introduce Business Delegate
1.6) Introduce Foreign Method
1.7) Introduce Parameter Object
1.8) Localize Disparate Logic
1.9) Merge Session Beans
1.10) Move Business Logic to Session
1.11) Refactor Architecture by Tiers
1.12) Use a Connection Pool
1.13) Wrap entities with session - Non-Enterprise ประกอบด้วย
2.1) Add Parameter
2.2) Change Bidirectional Association to Unidirectional
2.3) Change Reference to Value
2.4) Change Unidirectional Association to Bidirectional
2.5) Change Value to Reference
2.6) Collapse Hierarchy
2.7) Consolidate Conditional Expression
2.8) Consolidate Duplicate Conditional Fragments
2.9) Convert Dynamic to Static Construction
2.10) Convert Static to Dynamic Construction
2.11) Decompose Conditional
2.12) Duplicate Observed Data
2.13) Encapsulate Collection
2.14) Encapsulate Downcast
2.15) Encapsulate Field
2.16) Extract Class
2.17) Extract Interface
2.18) Extract Method
2.19) Extract Package
2.20) Extract Subclass
2.21) Extract Superclass
2.22) Form Template Method
2.23) Hide Method
2.24) Inline Class
2.25) Inline Method
2.26) Inline Temp
2.27) Introduce Assertion
2.28) Introduce Explaining Variable
2.29) Introduce Local Extension
2.30) Introduce Null Object
2.31) Introduce Parameter Object
2.32) Move Class
2.33) Move Field
2.34) Move Method
2.35) Parameterize Method
2.36) Preserve Whole Object
2.37) Pull Up Constructor Body
2.38) Pull Up Field
2.39) Pull Up Method
2.40) Push Down Field
2.41) Push Down Method
2.42) Reduce Scope of Variable
2.43) Remove Assignments to Parameters
2.44) Remove Control Flag
2.45) Remove Double Negative
2.46) Remove Middle Man
2.47) Remove Parameter
2.48) Remove Setting Method
2.49) Rename Method
2.50) Replace Array with Object
2.51) Replace Assignment with Initialization
2.52) Replace Conditional with Polymorphism
2.53) Replace Conditional with Visitor
2.54) Replace Constructor with Factory Method
2.55) Replace Data Value with Object
2.56) Replace Delegation with Inheritance
2.57) Replace Error Code with Exception
2.58) Replace Exception with Test
2.59) Replace Inheritance with Delegation
2.60) Replace Iteration with Recursion
2.61) Replace Magic Number with Symbolic Constant
2.62) Replace Method with Method Object
2.63) Replace Nested Conditional with Guard Clauses
2.64) Replace Parameter with Explicit Methods
2.65) Replace Parameter with Method
2.66) Replace Record with Data Class
2.67) Replace Recursion with Iteration
2.68) Replace Static Variable with Parameter
2.69) Replace Subclass with Fields
2.70) Replace Temp with Query
2.71) Replace Type Code with Class
2.72) Replace Type Code with State/Strategy
2.73) Replace Type Code with Subclasses
2.74) Reverse Conditional
2.75) Self Encapsulate Field
2.76) Separate Data Access Code
2.77) Separate Query from Modifier
2.78) Split Loop
2.79) Split Temporary Variable
2.80) Substitute Algorithm
วันอังคารที่ 30 มิถุนายน พ.ศ. 2552
Refactoring 2
Refactoring แบ่งเป็น 2 กลุ่มใหญ่ ดังนี้:-
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น