CSC/ECE 517 Fall 2009/wiki1a 8 nd: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 4: Line 4:


*'''Class'''         
*'''Class'''         
**Changing class association            
**'''Changing Class Association'''            
***Change Unidirectional Assn to Bidirectional
***Change Unidirectional Assn to Bidirectional
***Change Unidirectional Assn to Bidirectional
***Change Unidirectional Assn to Bidirectional
Line 32: Line 32:
***Preserve Whole Object
***Preserve Whole Object


**Change of structure of the method code
**'''Change of Structure of the Method Code'''
***Extract Method
***Extract Method
***Inline Method
***Inline Method

Revision as of 23:34, 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.

  • Class
    • Changing Class Association
      • Change Unidirectional Assn to Bidirectional
      • Change Unidirectional Assn to Bidirectional
    • 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
    • Addition to a class
      • Pull up constructor body
      • Pull up Field
      • Pull up Method
      • Push down Field
      • Push down Method

  • Method
    • Meaningful and Detailed Method Calls
      • Add Parameter
      • Rename method
      • Preserve Whole Object
    • 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