Product Details
Refactoring: Improving the Design of Existing Code (Object Technology)

Refactoring: Improving the Design of Existing Code (Object Technology)
By Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts

List Price: £37.99
Price: £26.13

Availability: Usually dispatched within 1-2 business days
Dispatched from and sold by the_book_depository

23 new or used available from £19.50

Average customer review:

Product Description

Refactoring is about improving the design of existing code. It is the process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its internal structure. With refactoring you can even take a bad design and rework it into a good one. This book offers a thorough discussion of the principles of refactoring, including where to spot opportunities for refactoring, and how to set up the required tests. There is also a catalog of more than 40 proven refactorings with details as to when and why to use the refactoring, step by step instructions for implementing it, and an example illustrating how it works The book is written using Java as its principle language, but the ideas are applicable to any OO language.


Product Details

  • Amazon Sales Rank: #8392 in Books
  • Published on: 1999-07-23
  • Number of items: 1
  • Binding: Hardcover
  • 464 pages

Editorial Reviews

Amazon.co.uk Review
Your class library works, but could it be better? Refactoring: Improving the Design of Existing Code shows how refactoring can make object-oriented code simpler and easier to maintain. Today, refactoring requires considerable design know-how, but once tools become available, all programmers should be able to improve their code using refactoring techniques.

Besides an introduction to what refactoring is, this handbook provides a catalogue of dozens of tips for improving code. The best thing about Refactoring is its remarkably clear presentation, along with excellent nuts-and-bolts advice, from object expert Martin Fowler. The author is also an authority on software patterns and UML, and this experience helps make this a better book, one that should be immediately accessible to any intermediate or advanced object-oriented developer. (Just like patterns, each refactoring tip is presented with a simple name, a "motivation," and examples using Java and UML.)

Early chapters stress the importance of testing in successful refactoring. (When you improve code, you have to test to verify that it still works.) After the discussion on how to detect the "smells" of bad code, readers get to the heart of the book, its catalogue of more than 70 "refactorings"--tips for better and simpler class design. Each tip is illustrated with "before" and "after" code, along with an explanation. Later chapters provide a quick look at refactoring research.

Like software patterns, refactoring may be an idea whose time has come. This groundbreaking title will surely help bring refactoring to the programming mainstream. With its clear advice on a hot new topic, Refactoring is sure to be essential reading for anyone who writes or maintains object- oriented software. --Richard Dragan

Topics Covered: Refactoring, improving software code, redesign, design tips, patterns, unit testing, refactoring research and tools.

Synopsis
Refactoring is about improving the design of existing code. It is the process of changing a software system in such a way that it does not alter the external behavior of the code, yet improves its internal structure. With refactoring you can even take a bad design and rework it into a good one. This book offers a thorough discussion of the principles of refactoring, including where to spot opportunities for refactoring, and how to set up the required tests. There is also a catalog of more than 40 proven refactorings with details as to when and why to use the refactoring, step by step instructions for implementing it, and an example illustrating how it works The book is written using Java as its principle language, but the ideas are applicable to any OO language.

From the Back Cover

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 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.



0201485672B04062001


Customer Reviews

Required Reading5
I'd advise people to ignore the negative reviews for the following reasons:

1) People now talk about specific refactorings so, like design patterns, you need to know the names.
2) It was never supposed to teach you good design. If you want to learn that there are good books out there (including by Craig Larman and Robert C. Martin).
3) Some of it is basic but you can ignore that stuff if you want to, and when your doing some of the more complicated refactorings they could well be useful.
4) As Martin Fowler points out you don't need to read it cover to cover, in fact he advises you use it as a reference.


What this does teach you is how to iteratively improve bad code, something every developer needs to be able to do. In any case its valuable to read about the code smells, the reasons for needing to do specific refactorings and to read the examples.

Also if you want more advanced concepts I'd recommend "Agile Software Development" by Robert C. Martin and "Refactoring to Patterns" by Joshua Kerievsky which both build on this work.

Who is this book aimed at ?1
The best thing I can say about this book is it uses nice paper and looks good on the book shelf.

I have no idea who this book is aimed at !

If you are new to programming, I'd very much suggest getting a good OOD and learn to design your code properly from the outset. This is not to say refactoring is not of use, but this book does not really teach good design which would be far more useful than trying to evolve a design by refactoring. I'm actually uncertain what it does teach.

On the other hand, if you earn your living writing software - in all honesty if you don't already know this stuff you might be better off looking for another career.

It's all pretty basic, I mean "move method", "encapsulate field" and so on.

The cynic in me feels this was written solely for the author to make a name for himself by giving his names to techniques the rest of us have used for many years. Whilst I rate some of the authors online articles and even the other book I have by him is fairly useful - this refactoring book is not a good piece of work.

For those experienced software developers there is only one reason to own this book and that is because somebody is bound to use it to ask an interview question at a your next job interview and unless you know the name of the refactoring technique I'm sure nobody will believe you can actually do it !

Not sure whether it's worth it3
Big fan of Martin Fowler books, but this one looks a bit dated now. A lot of the content is common sense and whilst it's not to say that everyone out there is doing it (we all know we should do it more), I'm not sure whether you need a such a book to tell you such obvious refactoring methods. If you're new to programming and you don't know anything regarding good style maybe this is for you, however there's other books I'd go for more (Effective Java, for example).