CSC/ECE 517 Fall 2009/wiki1a 8 nd: Difference between revisions
Jump to navigation
Jump to search
Nachiketag (talk | contribs) |
Nachiketag (talk | contribs) |
||
Line 12: | Line 12: | ||
*'''Class''' | *'''Class''' | ||
**'''Changing Class Association''' | **'''Changing Class Association''' | ||
***Change Unidirectional | ***Change Unidirectional Association to Bidirectional | ||
***Change Unidirectional | ***Change Unidirectional Association to Bidirectional | ||
**'''Change of | **'''Change of Class Structure''' | ||
***Collapse Hierarchy | ***Collapse Hierarchy | ||
***Duplicate Observed Data | ***Duplicate Observed Data | ||
Line 25: | Line 25: | ||
***Separate Data Access Code | ***Separate Data Access Code | ||
**'''Addition to a | **'''Addition to a Class''' | ||
***Pull up | ***Pull up Constructor Body | ||
***Pull up Field | ***Pull up Field | ||
***Pull up Method | ***Pull up Method | ||
***Push | ***Push Down Field | ||
***Push | ***Push Down Method | ||
---- | ---- | ||
Line 36: | Line 36: | ||
**'''Meaningful and Detailed Method Calls''' | **'''Meaningful and Detailed Method Calls''' | ||
***Add Parameter | ***Add Parameter | ||
***Rename | ***Rename Method | ||
***Preserve Whole Object | ***Preserve Whole Object | ||
Line 55: | Line 55: | ||
**'''Improve Method Readability''' | **'''Improve Method Readability''' | ||
***Introduce Explaining Variable | ***Introduce Explaining Variable | ||
***Replace | ***Replace Magic No with Symbolic Constant | ||
***Split Temporary Variable | ***Split Temporary Variable | ||
Line 61: | Line 61: | ||
***Replace Conditional with Polymorphism | ***Replace Conditional with Polymorphism | ||
***Replace Conditional with Visitor | ***Replace Conditional with Visitor | ||
***Replace | ***Replace Parameter with Explicit Methods | ||
---- | ---- | ||
Line 74: | Line 74: | ||
**'''Object Initialization''' | **'''Object Initialization''' | ||
***Replace | ***Replace Constructor with Factory Method | ||
**'''Accessing the Object/Data''' | **'''Accessing the Object/Data''' | ||
***Change Reference to Value | ***Change Reference to Value | ||
***Change Value to Reference | ***Change Value to Reference | ||
***Refactor Architecture by | ***Refactor Architecture by Tiers | ||
***Self Encapsulate Field | ***Self Encapsulate Field | ||
Line 99: | Line 99: | ||
**'''Method Code Simplification''' | **'''Method Code Simplification''' | ||
***Remove | ***Remove Double Negative | ||
***Replace Assignment with Initialization | ***Replace Assignment with Initialization | ||
***Encapsulate | ***Encapsulate Downcast | ||
***Reduce Scope of Variable | ***Reduce Scope of Variable | ||
***Reverse Conditional | ***Reverse Conditional | ||
Line 115: | Line 115: | ||
---- | ---- | ||
*'''Refactoring for | *'''Refactoring for Privacy''' | ||
**Hide Delegate | **Hide Delegate | ||
**Hide Method | **Hide Method | ||
**Encapsulate | **Encapsulate Field | ||
**Hide Presentation Tier-Specific Details from the Business tier | **Hide Presentation Tier-Specific Details from the Business tier | ||
**Introduce Business Delegate | **Introduce Business Delegate | ||
**Wrap | **Wrap Entities with Session | ||
---- | ---- |
Revision as of 00:02, 5 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 Association to Bidirectional
- Change Unidirectional Association 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"
- Refactoring for Privacy
- Hide Delegate
- Hide Method
- Encapsulate Field
- Hide Presentation Tier-Specific Details from the Business tier
- Introduce Business Delegate
- Wrap Entities with Session
- Dealing with Exceptions
- Remove Error Code with Exception
- Replace Exception with Test