CSC/ECE 517 Fall 2009/wiki1a 8 nd: Difference between revisions
Jump to navigation
Jump to search
Nachiketag (talk | contribs) |
Nachiketag (talk | contribs) |
||
Line 48: | Line 48: | ||
***Replace Parameter with Method | ***Replace Parameter with Method | ||
**'''Change Method Call | **'''Change Method Call Hierarchy''' | ||
***Remove Middle man | ***Remove Middle man | ||
***Replace Delegation with Inheritance | ***Replace Delegation with Inheritance | ||
***Replace Inheritance with Delegation | ***Replace Inheritance with Delegation | ||
**'''Improve Method | **'''Improve Method Readability''' | ||
***Introduce Explaining Variable | ***Introduce Explaining Variable | ||
***Replace magic No with symbolic Constant | ***Replace magic No with symbolic Constant | ||
Line 81: | Line 81: | ||
***Refactor Architecture by tiers | ***Refactor Architecture by tiers | ||
***Self Encapsulate Field | ***Self Encapsulate Field | ||
---- | |||
*'''Code''' | |||
**'''Code Optimization''' | |||
***Replace Temp with Query | |||
***Consolidate Duplicate Conditional Fragments | |||
***Decompose Conditional | |||
***Inline Temp | |||
***Introduce Assertion | |||
***Replace Iteration with Recursion | |||
***Remove Control Flag | |||
**'''Redundant Code Elimination''' | |||
***Parametrize Method | |||
***Remove Parameter | |||
**'''Method Code Simplification''' | |||
***Remove double negative | |||
***Replace Assignment with Initialization | |||
***Encapsulate downcast | |||
***Reduce Scope of Variable | |||
***Reverse Conditional | |||
***Separate Query from Modifier | |||
***Split Loop | |||
***Substitute Algorithm | |||
**'''"Removal of "Type Code"''' | |||
***Replace Type Code with Class | |||
***Replace Type Code with State/Strategy | |||
***Replace Type Code with Subclasses | |||
---- | ---- |
Revision as of 23:55, 4 September 2009
Categorization of Refactorings
Problem Statement : The list of refactorings has become quite long. But people don't remember long lists very well. To promote learning the different patterns, they should be categorized in some way, or perhaps, along various dimensions. As a reference we have taken the list of refactorings available at [1] and categorized them along as many different dimensions as makes sense.
- Package
- Extract Package
- Move Class
- Class
- Changing Class Association
- Change Unidirectional Assn to Bidirectional
- Change Unidirectional Assn to Bidirectional
- Changing Class Association
- Change of class structure
- Collapse Hierarchy
- Duplicate Observed Data
- Extract Class
- Extract SubClass
- Extract SuperClass
- Inline Class
- Replace Subclass with Fields
- Separate Data Access Code
- Change of class structure
- Addition to a class
- Pull up constructor body
- Pull up Field
- Pull up Method
- Push down Field
- Push down Method
- Addition to a class
- Method
- Meaningful and Detailed Method Calls
- Add Parameter
- Rename method
- Preserve Whole Object
- Meaningful and Detailed Method Calls
- Change of Structure of the Method Code
- Extract Method
- Inline Method
- Consolidate Conditional Expression
- Encapsulation Collection
- Form Template Method
- Replace Nested Conditional with Guard Clauses
- Replace Parameter with Method
- Change of Structure of the Method Code
- Change Method Call Hierarchy
- Remove Middle man
- Replace Delegation with Inheritance
- Replace Inheritance with Delegation
- Change Method Call Hierarchy
- Improve Method Readability
- Introduce Explaining Variable
- Replace magic No with symbolic Constant
- Split Temporary Variable
- Improve Method Readability
- Method Code Refactoring based on Method Arguments
- Replace Conditional with Polymorphism
- Replace Conditional with Visitor
- Replace parameter with explicit methods
- Method Code Refactoring based on Method Arguments
- Object
- Replacements with Objects
- Introduce Null Object
- Replace Array with Object
- Introduce Parameter Object
- Replace Data Value with Object
- Replace Method with Method Object
- Replacements with Objects
- Object Initialization
- Replace constructor with factory method
- Object Initialization
- Accessing the Object/Data
- Change Reference to Value
- Change Value to Reference
- Refactor Architecture by tiers
- Self Encapsulate Field
- Accessing the Object/Data
- Code
- Code Optimization
- Replace Temp with Query
- Consolidate Duplicate Conditional Fragments
- Decompose Conditional
- Inline Temp
- Introduce Assertion
- Replace Iteration with Recursion
- Remove Control Flag
- Code Optimization
- Redundant Code Elimination
- Parametrize Method
- Remove Parameter
- Redundant Code Elimination
- Method Code Simplification
- Remove double negative
- Replace Assignment with Initialization
- Encapsulate downcast
- Reduce Scope of Variable
- Reverse Conditional
- Separate Query from Modifier
- Split Loop
- Substitute Algorithm
- Method Code Simplification
- "Removal of "Type Code"
- Replace Type Code with Class
- Replace Type Code with State/Strategy
- Replace Type Code with Subclasses
- "Removal of "Type Code"