Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Part: 2 Getting Agile > Refactoring Your Code

Chapter 11. Refactoring Your Code

The goal of refactoring is to make system-wide code changes without affecting the behavior of a program. The principal motivation is to make the software easier to understand and cheaper to modify. The term refactoring had been used for years by the Smalltalk community, but it only became widespread following publication of Martin Fowler's definitive book, Refactoring: Improving the Design of Existing Code. The concepts are powerful, but they also can be time-consuming to apply.

Eclipse provides an extensive list of commands that automate your Java code refactoring. Many commands that appear to be simple, such as Move and Rename, are actually refactoring operations—for example, moving and renaming Java elements requires changes in dependent files. Other refactoring operations, such as Extract Interface, help you generalize a design in preparation for the next iteration of development. After using automated refactoring to rename a Java package containing many classes with dependencies, you'll never want to do this again the old manual way.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint