- Prime Student members get 10% off Books. Enter code STUDENT10 at checkout. Enter code STUDENT10 at checkout. Here's how (terms and conditions apply)
Refactoring: Improving the Design of Existing Code (Object Technology Series) Hardcover – 28 Jun 1999
- Choose from over 13,000 locations across the UK
- Prime members get unlimited deliveries at no additional cost
- Find your preferred location and add it to your address book
- Dispatch to this address when you check out
There is a newer edition of this item:
Special offers and product promotions
Frequently bought together
Customers who viewed this item also viewed
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Would you like to tell us about a lower price?
If you are a seller for this product, would you like to suggest updates through seller support?
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.
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.See all Product description
Customers who bought this item also bought
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
You may notice that most of the refactorings also have a reverse refactoring somewhere in the book. I guess the art of mastering refactoring is picking the most suitable one for the code you are writing (or someone else has written).
Don't be disappointed when you first read it, if you give it time the book and Martin's style of writing will grow on you.
- text cannot be reduced in size enough. Kindle touch character size range from enormous (8 words per page) to still too big (see below).
- page breaks aren't preserved.
The paper form of the book has small sections, sometimes a single page, each of which starts on a new page. The Kindle edition doesn't preserve the layout. Single page sections from the book usually take two pages on the Kindle; even on smallest font, line-spacing and margins. Other Kindle books do not usually have such a large font size.
The first section presents a large refactoring exercise applied to a little movie rental application, which ends up producing a very elegant solution when compared with the original. This is really like the Gang of Four book in that respect, where in the first sections of their book, they present their patterns applied to an example application, to produce a very elegant design. This isn't really surprising, since I'm sure I read Martin saying that he regards GoF as the best technical book of all time.
The first sections of the book are really about advocating a fundamentally different mindset towards refactoring. They are suggesting it's not something you should do just when something is broken or in a mess, but rather on a continuous basis, taking lots of little small steps to make your codebase easier to understand. The book details that this is something you're only really free to do if you have a rigorous test suite to tell you that you haven't broken anything, so there is a section on building a test suite. Interestingly, this book pre-dates Kent Beck's TDD book by a few years, and Beck contributed a lot to the book. There is also a section pointing out 'code smells' that should motivate refactoring; quite nicely, this is summarised in a table at the back of the book, which includes which refactorings you can apply to specific code smells. I actually have to confess that I skipped the section on building the test suite, since I'm a hardcore TDD developer and am already convinced about the merits of that, and didn't feel that it was worth investing my time in.
The next several sections of the book are more reference material. Again, just like the GoF book, each of the refactorings are presented as a pattern style library. As a result, this section of the book was a little harder to get through, as all of the examples that accompany the refactoring are fairly trivial (but you can completely understand the reasoning for that), so I sometimes found my attention a little bit waning.
Post library, there are sections on larger refactorings and refactoring tools, then a pretty large guest section by William Opdyke. To be honest, I didn't really feel like I took much away from the Opdyke section. It went into a lot of detail about refactoring tools and some of the dangers associated with refactoring in C++, due to the complexity of the language. I also just skimmed the section on the tools, since these are things that are quite commonly becoming integrated into the IDE these days.
It's clear this book was highly influenced by the GoF book. However, one aspect in which I think Fowler is superior is in his writing style. It's far less verbose and actually quite funny at times, which makes the book much more enjoyable to read.
Finally, Kent Beck writes a short summary, talking about how the book is only the beginning of the refactoring journey. That resonates quite a lot, as you get the feeling while reading the book, that the real value of it is going to be in continuously coming back to it in your daily work. Trying to look out for the code smells, then consulting the reference library and summary at the back, to aid you in going about eliminating them.
It's more than a decade old, but it's still brimming with insights that continue to apply. The examples use Java, but you can clearly see the concepts apply to any object oriented language.
"This is the book that I'm proudest of, in that it's had a high impact on the world of software development. Several development environments now automate many of the refactorings described in the book. Refactoring has become a full-fledged part of the software development lexicon "
If you haven't read it yet, you should.
Would you like to see more reviews about this item?
Most recent customer reviews
Is it time for the publisher to hire a couple of editors perhaps?Read more
Refactoring is a step-by-step process that guides code rewriting in a far more...Read more