blob: d3d23284569a760865a3aefd72d8c8a4aa2febed [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<org.eclipse.epf.uma:ContentDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:org.eclipse.epf.uma="http://www.eclipse.org/epf/uma/1.0.6/uma.ecore" xmlns:epf="http://www.eclipse.org/epf" epf:version="1.5.1" xmlns:rmc="http://www.ibm.com/rmc" rmc:version="7.5.1" xmi:id="-fj_9xjbrpaYNSETyCz5yJg" name="refactoring,_Poc7IPDzEdqYgerqi84oCA" guid="-fj_9xjbrpaYNSETyCz5yJg" changeDate="2008-01-16T05:54:37.000-0800" version="1.0.0">
<mainDescription>&lt;p>&#xD;
Refactoring is a disciplined way to restructure code when small changes are made to the code to improve its design. An&#xD;
important aspect of a refactoring is that it improves the design while not changing the behavior of the design; a&#xD;
refactoring neither adds nor removes functionality.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
Refactoring enables you to evolve the code slowly over time, to take an iterative and incremental approach to&#xD;
implementation.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
These are the types of refactoring:&#xD;
&lt;/p>&#xD;
&lt;ol>&#xD;
&lt;li>&#xD;
Code refactoring. Often referred to simply as refactoring, this is the refactoring of programming source code.&#xD;
Examples of code refactorings include Rename Method, Encapsulate Field, Extract Class, Introduce Assertion, and&#xD;
Pushdown Method.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Database refactoring. A database refactoring is a simple change to a database schema that improves its design while&#xD;
retaining both its behavioral and informational semantics. Examples of database refactorings include Rename Column,&#xD;
Split Table, Move Method to Database, Replace LOB with Table, Introduce Column Constraint, and Use Official Data&#xD;
Source.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
User interface (UI) refactoring. A UI refactoring is a simple change to the UI which retains its semantics.&#xD;
Examples of UI refactorings include Align Entry Fields, Apply Common Button Size, Apply Common Font, Indicate&#xD;
Format, Reword in Active Voice, and Increase Color Contrast.&#xD;
&lt;/li>&#xD;
&lt;/ol>&#xD;
&lt;p>&#xD;
Martin Fowler [&lt;a class=&quot;elementLinkWithUserText&quot;&#xD;
href=&quot;./../../../core.tech.common.base/guidances/supportingmaterials/references.tech_6CCF393.html#FOW99&quot;&#xD;
guid=&quot;_9ToeIB83Edqsvps02rpOOg&quot;>FOW99&lt;/a>] identifies four key reasons to refactor:&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
Refactoring improves the design of software.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Refactoring makes software easier to understand.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Refactoring helps you find bugs.&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
Refactoring helps you program faster.&#xD;
&lt;/li>&#xD;
&lt;/ul>&#xD;
&lt;p>&#xD;
Refactoring can improve the design of existing code, but it does not take the place of considering the design before&#xD;
writing code. Refactoring instead changes the role of up-front design, allowing the strictly design work to be more&#xD;
abstract. Small-scale, very tactical decisions can be made during the implementation of the solution with confidence&#xD;
that refactoring will ensure a quality implementation at that level. The designing of the solution before&#xD;
implementation will be more lightweight and focused on broad factors that will drive the implementation.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
There is an additional benefit of refactoring: it changes the way a developer thinks about the implementation when not&#xD;
refactoring. The basic task of implementing a solution becomes solely about getting the solution to pass its developer&#xD;
tests in the simplest way possible. Then the design of that solution can be examined and refactored separately. Even if&#xD;
these two things -- implementation of the solution and then improvement -- are just a minute apart, it can be freeing&#xD;
for a developer to single-mindedly create code that causes a test to pass, and then separately single-mindedly improve&#xD;
that code.&#xD;
&lt;/p>&#xD;
&lt;p>&#xD;
These are some additional resources:&#xD;
&lt;/p>&#xD;
&lt;ul>&#xD;
&lt;li>&#xD;
&lt;a href=&quot;http://www.refactoring.com/&quot; target=&quot;_blank&quot;>&lt;u>&lt;font&#xD;
color=&quot;#0000ff&quot;>http://www.refactoring.com/&lt;/font>&lt;/u>&lt;/a>&#xD;
&lt;/li>&#xD;
&lt;li>&#xD;
&lt;a href=&quot;http://www.agiledata.org/essays/databaseRefactoring.html&quot;>&lt;u>&lt;font&#xD;
color=&quot;#0000ff&quot;>http://www.agiledata.org/essays/databaseRefactoring.html&lt;/font>&lt;/u>&lt;/a>&#xD;
&lt;/li>&#xD;
&lt;/ul></mainDescription>
</org.eclipse.epf.uma:ContentDescription>