Refactoring: Improving the Design of Existing CodeAs the application of object technology--particularly the Java programming language--has become commonplace, a new problem has emerged to confront the software development community. Significant numbers of poorly designed programs have been created by less-experienced developers, resulting in applications that are inefficient and hard to maintain and extend. Increasingly, software system professionals are discovering just how difficult it is to work with these inherited, "non-optimal" applications. For several years, expert-level object programmers have employed a growing collection of techniques to improve the structural integrity and performance of such existing software programs. Referred to as "refactoring," these practices have remained in the domain of experts because no attempt has been made to transcribe the lore into a form that all developers could use. . .until now. In Refactoring: Improving the Design of Existing Code, renowned object technology mentor Martin Fowler breaks new ground, demystifying these master practices and demonstrating how software practitioners can realize the significant benefits of this new process. With proper training a skilled system designer can take a bad design and rework it into well-designed, robust code. In this book, Martin Fowler shows you where opportunities for refactoring typically can be found, and how to go about reworking a bad design into a good one. Each refactoring step is simple--seemingly too simple to be worth doing. Refactoring may involve moving a field from one class to another, or pulling some code out of a method to turn it into its own method, or even pushing some code up or down a hierarchy. While these individual steps may seem elementary, the cumulative effect of such small changes can radically improve the design. Refactoring is a proven way to prevent software decay. In addition to discussing the various techniques of refactoring, the author provides a detailed catalog of more than seventy proven refactorings with helpful pointers that teach you when to apply them; step-by-step instructions for applying each refactoring; and an example illustrating how the refactoring works. The illustrative examples are written in Java, but the ideas are applicable to any object-oriented programming language. |
What people are saying - Write a review
User ratings
5 stars |
| ||
4 stars |
| ||
3 stars |
| ||
2 stars |
| ||
1 star |
|
LibraryThing Review
User Review - jsburbidge - LibraryThingThis is the book that moved refactoring from the focus of a narrow community to a general concept. Illuminating, well-written, and helpful, it strikes an effective balance between the concrete and the ... Read full review
LibraryThing Review
User Review - brikis98 - LibraryThingPros: presenting refactoring as a regular part of the development process is an important step forward. The example at the start of the book is a great demonstration if why this stuff matters. Nice to ... Read full review
Contents
Refactoring a First Example | 1 |
Principles in Refactoring | 53 |
Bad Smells in Code by Kent Beck and Martin Fowler | 75 |
Building Tests | 89 |
Toward a Catalog of Refactorings | 103 |
Composing Methods | 109 |
Moving Features Between Objects | 141 |
Organizing Data | 169 |
Dealing with Generalization | 319 |
Big Refactorings by Kent Beck and Martin Fowler | 359 |
Refactoring Reuse and Reality by William Opdyke | 379 |
Refactoring Tools by Don Roberts and John Brant | 401 |
Putting It All Together by Kent Beck | 409 |
References | 413 |
List of Soundbites | 417 |
419 | |
Other editions - View all
Refactoring: Improving the Design of Existing Code Martin Fowler,Kent Beck No preview available - 1999 |
Common terms and phrases
_itemPrice _name accessors behavior boolean callers class Customer class Movie class Person client Compile and test create database daysRented delegate discountFactor double result duplicate each.getDaysRented easier Encapsulate Field Enumeration rentals Example Extract Class 149 Extract Method 110 factory method frequent renter points Gang of Four getCharge getName getPriceCode getter hierarchy inheritance Inline inputVal interface Java JUnit Kent Beck look Martin Fowler Mechanics modify Motivation Move Method 142 Movie Movie.NEW_RELEASE Null Object object-oriented object-oriented program people[i].equals Polymorphism private double private int public int public static public String public void Pull Up Method quantity query Ralph Johnson refactoring Refactoring Browser reference remove Rename Method 273 rentals.nextElement Replace Type Code return basePrice return result setting method Smalltalk statement static final int String name subclass superclass switch switch statement System.out.println temporary variable things thisAmount tool