*Definition* [[Refactoring][Refactoring]] is typically applied at the level of programs (i.e., source code). A program refactoring is a [[ProgramTransformation][program transformation]] that improves the design of a program while preserving its behaviour. MartinFowler defines a *refactoring* as: * _a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior_ He then continues to define the verb *to refactor* as * _to restructure software by applying a series of refactorings without changing its observable behavior_. Refactoring is an important component of the [[XP][Extreme Programming]] software engineering methodology. In this context, refactorings are often associated with: * many small changes applied repeatedly * a catalog of widely discussed changes * explicit unit tests applied before and after each minimal change * interactive, perhaps tool-supported, but not automated. ----

Tools

The following indicative list of refactoring tools is inevitable incomplete but gives a clear idea about the diversity of tools for refactoring available. For a more up to date list of refactoring tools, we refer to the Google Web Directory on [[http://directory.google.com/Top/Computers/Programming/Languages/Java/Development_Tools/Code_Refactoring/?il=1][Code Refactoring]] *JavaLanguage* * [[http://www.intellij.com/idea/][IDEA]] * [[http://transmogrify.sourceforge.net][Transmogrify]] * [[http://jrefactory.sourceforge.net][JRefactory]] * [[http://www.instantiations.com/jfactor/][jFactor]] * [[http://recoder.sourceforge.net][RECODER]] * [[http://injectj.fzi.de][InjectJ]] * [[http://www.eclipse.org/][Eclipse]] * [[http://www.refactorit.com/][RefactorIt]] *Smalltalk* * [[http://st-www.cs.uiuc.edu/~brant/Refactory/RefactoringBrowser.html][Smalltalk Refactoring Browser]] *Special Refactoring Tools* Tools for carrying out specific refactorings have been built over the years. Commercial tools for restructuring spaghetti code in COBOL and FORTRAN have been available since the late 1970s. There are reputed to be tools that will restructure C programs and headers to use minimal numbers of INCLUDEs. Specific tools include: * [[http://www.semdesigns.com/Products/Clone/index.html][CloneDR]] - Finds (and possibly removes) redundant source code ----

Resources

A more extensive and up to date list of [[http://staff.umh.ac.be/Mens.Tom/resources/refactoringPapers.html][software refactoring literature]] is available. *Books* * MartinFowler. [[Refactoring Improving the Design of Existing Code][Refactoring: Improving the Design of Existing Code]], Addison-Wesley, 1999. This book presents a catalog of refactorings on [[JavaLanguage][Java programs]]. The [[http://www.refactoring.com/catalog/][refactoring catalog]] is also available online. *Surveys* * TomMens, TomTourwe. [[http://csdl.computer.org/comp/trans/ts/2004/02/e0126abs.htm][A survey on software refactoring]], Transactions on Software Engineering, IEEE Computer Society Press, February 2004. *PhD Theses* * Sander Tichelaar. Modeling Object-Oriented Software for Reverse Engineering and Refactoring. University of Bern, 2001. * Don Bradley Roberts. Practical Analysis for Refactoring. University of Illinois at Urbana-Champaign, 1999. * William F. Opdyke. Refactoring: A Program Restructuring Aid in Designing Object-Oriented Application Frameworks. University of Illinois at Urbana-Champaign, 1992. * William G. Griswold. Program Restructuring as an Aid to Software Maintenance. University of Washington, August 1991. *Useful links* * [[http://www.refactoring.com]]: the refactoring site maintained by MartinFowler. * [[http://c2.com/cgi/wiki?WikiPagesAboutRefactoring]]: an extensive list of all the refactoring pages at the Wiki of WardCunningham. * [[http://directory.google.com/Top/Computers/Programming/Methodologies/Refactoring/][Google Web Directory on Refactoring]] ----

Research Projects

* [[http://www.cs.vu.nl/lppr/][Language Parametric Program Restructuring]], a research project by RalfLaemmel * [[http://www.cs.kent.ac.uk/projects/refactor-fp/][Refactoring Functional Programs]], a research project by SimonThompson and ClausReinke * [[http://win-www.uia.ac.be/u/lore/refactoringProject/index.php][Formal Foundations of Software Refactoring]], a research project by TomMens, SergeDemeyer and DirkJanssens. ---

Events

* [[http://swen.uwaterloo.ca/~reface03/][The First International Workshop on Refactoring: Achievements, Challenges, Effects]] (REFACE03), November 2003 * [[http://www.fots.ua.ac.be/graphtransfo_refactoring/][Graph Transformation for Refactoring]], April 2004 ----

People

* MartinFowler * ChrisSeguin * DonRoberts * RalfLaemmel is working on _generic refactoring_: language-independent refactorings * SimonThompson * ClausReinke * TomMens * SergeDemeyer * DirkJanssens * TomTourwe ----- CategoryTransformationParadigm | CategoryReengineeringPages | CategorySoftwareEvolution | Contributors: Main.EelcoVisser, Main.ArieVanDeursen, Main.MartinBravenboer, Main.TomMens - 5 April 2004