Clean Code Notes
Concepts
📘 Handbook
🔍 Search
🌙
☀️
Home
/
Concepts
/
Refactoring Moves
🔧 Refactoring Moves
Extract/Inline、Move、Replace Conditional… 對照手法目錄。
13 pages
以多型取代條件式 (Replace Conditional with Polymorphism)
★★★★★
以防衛敘句取代巢狀條件 (Replace Nested Conditional with Guard Clauses)
★★★★★
提取函式 (Extract Function)
★★★★★
提取變數 (Extract Variable)
★★★★★
更改函式宣告 (Change Function Declaration)
★★★★★
內聯函式 (Inline Function)
★★★★
★
分解條件式 (Decompose Conditional)
★★★★
★
引入參數物件 (Introduce Parameter Object)
★★★★
★
拆分階段 (Split Phase)
★★★★
★
提取類別 (Extract Class)
★★★★
★
移動函式 (Move Function)
★★★★
★
以查詢取代暫存變數 (Replace Temp with Query)
★★★
★★
封裝變數 (Encapsulate Variable)
★★★
★★