리팩토링 목록
2022. 2. 8. 16:36HTTPS://WWW.REFACTORING.COM/CATALOG/
Refactoring Catalog
COMPOSING METHOD
• Extract Method
• Inline Method
• Inline Temp
• Replace Temp with Query
• Introduce Explaining Variable
• Split Temporary Variable
• Remove Assignments to Parameters
• Replace Method with Method Object
MOVING FEATURES BETWEEN OBJECTS
• Move Method
• Move Field
• Extract Class
• Inline Class
• Hide Delegate
• Remove Middleman
• Introduce Foreign Method
• Introduce Local Extension
ORGANIZING DATA
• Self Encapsulate Field
• Replace Data Value with Object
• Change Value to Reference
• Change Reference to Value
• Replace Array with Object
• Duplicate Observed Data
• Change Unidirectional Association to Bidirectional
• Change Bidirectional Association to Unidirectiona
• Replace Magic Number with Symbolic Constant
• Encapsulate Field
• Encapsulate Collection
• Replace Record with Data Class
• Replace Type Code with class
• Replace Type Code with Subclasses
• Replace Type Code with State/Strategy
• Replace Subclass with Field
SIMPLIFYING CONDITIONAL EXPRESSIONS
• Decompose Conditional
• Consolidate Conditional Expression
• Consolidate Duplicate Conditional Fragments
• Remove Control Flag
• Replace Nested Conditional with Guard Clauses
• Replace Conditional with Polymorphism
• Introduce Null Object
• Introduce Assertion
MAKING METHOD CALL SIMPLER
• Rename Method
• Add Parameter
• Remove Parameter
• Separate Query from Modifier
• Parameterize Method
• Replace Parameter with Explicit Method
• Preserve Whole Object
• Replace Parameter with Method
• Introduce Parameter Object
• Remove Setting Method
• Hide Method
• Replace Constructor with Factory Method
• Encapsulate Downcast
• Replace Error Code with Exception
• Replace Exception with Test
DEALING WITH GENERALIZATION
• Pull up Field
• Pull up Method
• Pull up Constructor Body
• Push down Method
• Push down Field
• Extract Subclass
• Extract Superclass
• Extract Interface
▪ Collapse Hierarchy
▪ Form Template Method
▪ Replace Inheritance with Delegation
▪ Replace Delegation with Inheritance
'소프트웨어(Software)' 카테고리의 다른 글
스레드 세이프 (Thread-safe) 란? (0) | 2022.02.15 |
---|---|
리버스 엔지니어링하는 방법, 결과물들. (0) | 2022.02.13 |
코드 냄새: 리팩토링해야할 것 같은 냄새(smells) 모음 (0) | 2022.02.08 |
도메인 모델 그리기 (Domain Model) (예시) (수정중) (0) | 2022.01.25 |
데이터 모델 스타일 뷰 그리기 (Data Model Style) (0) | 2022.01.24 |