Refactoring: Improving the Design of Existing Code

Other Format
from $0.00

Author: Martin Fowler

ISBN-10: 0201485672

ISBN-13: 9780201485677

Category: Software Engineering

Search in google:

As 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 Software, 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 ahierarchy. 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. Booknews A guide to refactoring, the process of changing a software system so that it does not alter the external behavior of the code yet improves its internal structure, for professional programmers. Early chapters cover general principles, rationales, examples, and testing. The heart of the book is a catalog of refactorings, organized in chapters on composing methods, moving features between objects, organizing data, simplifying conditional expressions, and dealing with generalizations. Later chapters describe issues in adopting refactoring in commercial development, automated tools, and the future of refactoring. Java is used for all examples. Annotation c. Book News, Inc., Portland, OR (booknews.com)

ForewordPrefaceCh. 1Refactoring, a First Example1Ch. 2Principles in Refactoring53Ch. 3Bad Smells in Code75Ch. 4Building Tests89Ch. 5Toward a Catalog of Refactorings103Ch. 6Composing Methods109Ch. 7Moving Features Between Objects141Ch. 8Organizing Data169Ch. 9Simplifying Conditional Expressions237Ch. 10Making Method Calls Simpler271Ch. 11Dealing with Generalization319Ch. 12Big Refactorings359Ch. 13Refactoring, Reuse, and Reality379Ch. 14Refactoring Tools401Ch. 15Putting It All Together409References413List of Soundbites417Index419