Shop now Shop now Shop now  Up to 50% Off Fashion  Shop all Amazon Fashion Cloud Drive Photos Shop now Learn More Shop now Shop now Shop Fire Shop Kindle Learn more Shop now Shop now

Customer Reviews

4.8 out of 5 stars9
4.8 out of 5 stars
5 star
4 star
3 star
2 star
1 star
Format: Hardcover|Change
Price:£43.60+ Free shipping with Amazon Prime
Your rating(Clear)Rate this item

There was a problem filtering reviews right now. Please try again later.

on 6 January 2005
Refactoring To Patterns brings together the Patterns movement, and the practice of Refactoring commonplace in the Agile community. Whereas the original Gang of Four book told us what patterns were, what sort of problems they solved, and how the code might be structured, Refactoring To Patterns illustrates how, why and when to introduce patterns into an existing codebase.
The opening chapters cover the background, introducing both refactoring and design patterns, and the context in which the book was written. This gives the reader a clear overview of what is involved in Refactoring to Patterns, and paves the way for the refactoring catalogue which makes up the bulk of the book.
The catalogue is divided into chapters based on the type of change required --- is this a refactoring to simplify code, generalize code, or increase encapsulation and protection? Each chapter has an introduction which gives an overview of the refactorings contained within that chapter, followed by the refactorings themselves. These introductions clearly illustrate the principles and choices which would lead one to follow the refactorings that follow.
Each refactoring starts with a brief one sentence summary, and before and after structure diagrams with reference to the structure diagrams for the relevant pattern in the Design Patterns book. The sections that follow then cover the Motivation for using this refactoring, step-by-step Mechanics, and a worked Example, relating back to the steps given for the Mechanics. Finally, some of the refactorings finish with Variations on the same theme. The examples are all pulled from a small sample of projects, which are introduced at the beginning of the catalogue section, and help illuminate the instructions given in the Mechanics section. The mechanics themselves are generally clear, and broken down into small steps --- sometimes smaller steps than I might take in practice, but I think this is probably wise, as large steps can easily confuse. Finally, the Motivation sections do a good job of explaining why one would choose to do a particular refactoring, and any pitfalls to doing so --- the "Benefits and Liabilities" tables provide a useful summary.
This book is well written, easy to read, and genuinely useful. It has helped me put some of the refactorings I do into a larger context, and given me insight into how I can integrate patterns with existing code, rather than designing them in up front. As John Brant and Don Roberts highlight in their Afterword, this is a book to study, the real benefit comes not from knowing the mechanics, but by understanding the motivation, and the process, so that one may apply the same thinking to other scenarios not covered by this book. If you are serious about software development, buy this book, inwardly digest it, and keep it by your side.
Highly Recommended.
0Comment|26 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 11 March 2013
For some reason this book escaped my notice until recently, which is a pity, because it's a very useful book indeed. Quite a lot of programmers, even those using using agile methods, seem to think that patterns are merely something that you spot at the design stage. This is not always the case, though it's useful if you do spot a pattern early on. Programs evolve, and as they do, patterns become more obvious, and indeed may not have been appropriate at earlier stages of the evolution.

The book, as its title implies, deals with evolving programs, and does it very well. The bulk of the book takes a relatively small number of patterns and, using real world examples, gives a step by step analysis, with Java code, of how to refactor into the pattern. As long as readers do treat these as examples, rather than something set in stone, they will find learn a lot about the arts of identifying patterns and the nitty gritty of refactoring.

I also liked the pragmatism of the author. Unlike some pattern freaks, he freely admits that there are times when using a specific pattern is overkill, especially where the problem is simple. Most people, myself included, when the idea of patterns are first grasped, tend to see patterns in everything and immediately implement them. This is frequently inappropriate, and rather than making the program structure clearer, muddies the waters. There are a number of warnings in the book against this approach.

I was very impressed by this book. In fact it is one of a small number of books that has made it to my work desk, where it fits in, both intellectually and literally, between the Gang of Four's Design Patterns, and Martin Fowler's Refactoring!

Highly recommended.
0Comment|4 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 16 December 2010
This is the book where theory meets practice. I enjoyed the structure of the book and I highly recommend this book to anyone who doesn't have a complete understanding where & how to use design patterns. It is true that code samples were written in Java but it is not a big problem at all for developers who use other languages because samples are easy to follow for anyone who can follow pseudo-code.

Notes about the Kindle edition:

I do not have the hardcover edition so I cannot compare them but the Kindle edition had some flaws in code samples. Joshua Kerievsky over-lined the code which is needed to be removed and used bold text to make the newly added code clearly visible. I think it is a very good formatting to understand what is going on while refactoring but in the Kindle edition of this book, some code lines were not over-lined although those lines were needed to be removed or some code lines were not bold although those lines were added newly. However it was not a huge problem because to understand each refactoring you need to study all of them one by one and while doing so, it is not difficult to understand what is going on in the code.
0Comment|2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 28 April 2007
This book provides an insight to refactoring and how patterns can assist in the process. The author provides case studies and examples of refactoring and how to achieve it successfully. I would recommend this book and also Refactoring by Martin Fowler
0Comment|Was this review helpful to you?YesNoReport abuse
on 5 November 2004
Sits on my desk with the two volumes mentioned in the title to this review. Found myself sitting on the train going home, reading "Refactoring to Patterns", and emailing myself at work with a wee gem of a refactoring to pattern for code I was working on at the time. I recommend you read it following the "Study Sequence" that appears at the end of chapter 5.
0Comment|6 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 8 May 2016
Recommended by a colleague and hasn't disappointed
0Comment|Was this review helpful to you?YesNoReport abuse
on 13 February 2008
This book doesn't cover the theory of patterns, it shows how to apply them to various example pieces of code. It also warns against putting patterns in everywhere, and has an excellent example on the overuse of patterns.

A lot of the patterns and refactorings in the book I had heard of before, a few I hadn't and the examples explained their usage particularly well.

This is one of those books that you can read for a few minutes at a time, as each refactoring is covered in its own section over 10 pages or so.

This is definitely one of the best patterns books I have read.
0Comment|2 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 19 January 2006
I agree with the other reviews of this book, it really does a good job of showing how refactoring to patterns can improve your designs.

Where I diverge slightly with the other reviewers is that I did find that parts of the books were very badly written, this didn't stop it being an excellent book but it was annoying. I also thought that full before/after source code would have made it much more readable, particularly for people like me who aren't used to reading densely packed Java code.

I also thought this book was a good partner to "Agile Software Development" by Robert C. Martin.
0Comment|3 people found this helpful. Was this review helpful to you?YesNoReport abuse
on 19 January 2006
Whilst the idea behind this book is sound and the author does not seem to put enough effort into making the book readable.
The examples were often a little hard to understand. I liked the fact that author used examples he'd met professionally but he often doesn't give you enough context to work out whats going on.
However what really hurts this book is that the author often fails to explain things clearly. For example: "If the instantiator doesn't instantiate the product using a Creation Method, modify it and, if necessary, also modify the products class, so the instantiation occurs through a Creation Method".
11 comment|11 people found this helpful. Was this review helpful to you?YesNoReport abuse

Sponsored Links

  (What is this?)