You are here: User Guide > Concepts > Refactoring

Refactoring

The Refactoring feature in Zend Studio allows you to:

 

 

Usage Example

Example:

Implementing an extract method refactoring on the variable $my_form in the following code:

 

Will result in the following code being created (the changes have been highlighted):

 

 

Martin Fowler, the creator of the Refactoring concept, defines it as the following:

"Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior. Its heart is a series of small behavior preserving transformations. Each transformation (called a 'refactoring') does little, but a sequence of transformations can produce a significant restructuring. Since each refactoring is small, it's less likely to go wrong. The system is also kept fully working after each small refactoring, reducing the chances that a system can get seriously broken during the restructuring."

 

 

 

Related Links:

Working with Refactoring (Tutorial)

Using Refactoring

Renaming Files

Renaming Elements

Organizing Includes

Refactor Menu

 

 

©1999-2012 Zend Technologies LTD. All rights reserved.