Title :
Refactoring to role objects
Author :
Steimann, Friedrich ; Stolz, Fabian Urs
Author_Institution :
Lehrgebiet Programmiersysteme, Fernuniversitat in Hagen, Hagen, Germany
Abstract :
Role objects are a widely recognized design pattern for representing objects that expose different properties in different contexts. By developing a tool that automatically refactors legacy code towards this pattern and by applying this tool to several programs, we have found not only that refactoring to role objects as currently defined produces code that is hard to read and to maintain, but also that the refactoring has preconditions so strong that it is rarely applicable in practice. We have therefore taken a fresh look at role objects and devised an alternative form that solves the exact same design problems, yet is much simpler to introduce and to maintain. We describe refactoring to this new, lightweight form of role objects in informal terms and report on the implementation of our refactoring tool for the JAVA programming language, presenting evidence of the refactoring´s increased applicability in several sample programs.
Keywords :
Java; object-oriented methods; object-oriented programming; software maintenance; ubiquitous computing; Java programming language; design pattern; design problems; object representation; refactors legacy code; role object refactoring tool; Concrete; Context; Couplings; Java; Object oriented programming; Organizations; Receivers; delegation; object schizophrenia; refactoring to patterns; roles;
Conference_Titel :
Software Engineering (ICSE), 2011 33rd International Conference on
Conference_Location :
Honolulu, HI
Print_ISBN :
978-1-4503-0445-0
Electronic_ISBN :
0270-5257
DOI :
10.1145/1985793.1985854