ebook img

Refactoring to Patterns PDF

430 Pages·2004·5.146 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Refactoring to Patterns

2 3 Inside Front Cover List of Refactorings Refactoring Page Chain Constructors 340 Compose Method 123 Encapsulate Classes with Factory 80 Encapsulate Composite with Builder 96 Extract Adapter 258 Extract Composite 214 Extract Parameter 346 Form Template Method 205 Inline Singleton 114 Introduce Null Object 301 Introduce Polymorphic Creation with Factory Method 88 Limit Instantiation with Singleton 296 Move Accumulation to Collecting Parameter 313 Move Accumulation to Visitor 320 4 Move Creation Knowledge to Factory 68 Move Embellishment to Decorator 144 Replace Conditional Dispatcher with Command 191 Replace Conditional Logic with Strategy 129 Replace Constructors with Creation Methods 57 Replace Hard-Coded Notifications with Observer 236 Replace Implicit Language with Interpreter 269 Replace Implicit Tree with Composite 178 Replace One/Many Distinctions with Composite 224 Replace State-Altering Conditionals with State 166 Replace Type Code with Class 286 Unify Interfaces 343 Unify Interfaces with Adapter 247 Refactoring Directions Pattern To Towards Away Unify Interfaces Extract Adapter (258), Unify Adapter with Adapter Interfaces with Adapter (247) (247) Encapsulate Composite with Builder Builder 5 Builder (96) Collecting Move Accumulation to Collecting Parameter Parameter (313) Replace Replace Conditional Dispatcher with Conditional Command Command (191) Dispatcher with Command (191) Composed Compose Method (123) Method Replace One/Many Distinctions with Encapsulate Composite (224), Extract Composite Composite Composite (214), Replace Implicit Tree with with Builder Composite (178) (96) Creation Replace Constructors with Creation Method Methods (57) Move Move Embellishment to Decorator Decorator Embellishment to (144) Decorator (144) Move Creation Knowledge to Factory Factory (68), Encapsulate Classes with Factory (80) Factory Introduce Polymorphic Creation with Method Factory Method (88) Replace Implicit Language with Interpreter Interpreter (269) Move Accumulation Iterator to Visitor 6 Null Introduce Null Object (301) Object Replace Hard- Coded Replace Hard-Coded Notifications Observer Notifications with Observer (236) with Observer (236) Inline Limit Instantiation with Singleton Singleton Singleton (296) (114) Replace State- Replace State-Altering Conditionals Altering State with State (166) Conditionals with State (166) Replace Replace Conditional Logic with Conditional Strategy Strategy (129) Logic with Strategy (129) Template Form Template Method (205) Method Move Visitor Move Accumulation to Visitor (320) Accumulation to Visitor (320) 7 8 Advance Praise for Refactoring to Patterns “For refactoring to be valuable it must be going somewhere, not just an abstract intellectual exercise. Patterns document program structures with known good properties. Put the two together and you have Refactoring to Patterns. If you want your refactorings to go somewhere, I suggest you read and apply Refactoring to Patterns.” —Kent Beck, Director, Three Rivers Institute “In the GoF book we claimed that design patterns are targets for refactorings. This book finally shows that we didn’t lie. By doing so, Joshua’s book will deepen your understanding of both refactoring and design patterns.” —Erich Gamma, Eclipse Java Development Tools lead, IBM “Now the connection between software patterns and agile development is finally told.” —Ward Cunningham “Refactoring to patterns is a revolutionary approach to applying patterns that combines the top-down utility of design patterns with the bottom-up discovery of iterative development and continuous refactoring. Any serious software developer should be using this approach to discover new opportunities to use patterns to improve their code.” —Bobby Woolf, Consulting I/T Specialist, IBM Software Services for WebSphere, and coauthor of Enterprise Integration Patterns (Addison-Wesley) and The Design Patterns Smalltalk Companion (Addison-Wesley). “With this unique catalog of design-level refactorings Joshua Kerievsky has given refactoring an entirely new dimension. Refactoring to Patterns shows developers how to make design-level improvements that simplify everyday work. This book is an invaluable reference for the refactoring practitioner.” —Sven Gorts “This book refactors and restructures GoF, and much more. Refactoring to Patterns takes a subject that has been presented as static and rigid and makes it dynamic and flexible, converting it into a human process with experiments, mistakes, and corrections so you understand that good designs do not occur by turning some series of cranks—they evolve through struggle and reflection. Kerievsky has also restructured the presentation to make it far clearer and easier to assimilate. Indeed, he has solved a number of the organization problems that I have 9 struggled with in Thinking in Patterns. This book is a clear introduction and combination of the disciplines of testing, refactoring, and patterns, and it is filled with easy reading, good sense, and great insights.” —Bruce Eckel, President of Mindview, Inc., and author of Thinking in Java/Thinking in C++ (Prentice Hall) “The first time I met Joshua, I was struck by the depth of his passion for understanding, applying, and teaching design patterns. Great teachers care deeply about their subject and how to share it. I think Joshua is a great teacher—and developer—and that we can all benefit from his insight. —Craig Larman, Chief Scientist, Valtech, and author of Applying UML and Patterns, Second Edition (Prentice Hall) and Agile and Iterative Development (Addison-Wesley) “Refactoring to Patterns is important not only because it provides step-by-step instructions on how to improve your code through the methodical introduction of appropriate patterns, but more so because it teaches the principles that underlie the design patterns implemented. This book should be useful for novice and expert designers alike. This is a great book.” —Kyle Brown, IBM Software Services for WebSphere, and author of Enterprise Java™ Programming with IBM® WebSphere®, Second Edition (Addison-Wesley) “Mastering a trade means more than just having the right tools—you also need to use them effectively. Refactoring to Patterns explains how to wield industrial- strength design tools with the skills of an artist.” —Russ Rufer, Silicon Valley Patterns Group “Josh uses patterns to guide the small steps of refactoring toward larger goals and uses refactoring to introduce patterns into your code as it evolves. You’ll learn how to make large improvements to existing code incrementally, rather than trying to force-fit a prefabricated solution. As the code changes you’ll go beyond seeing better designs—you’ll experience them.” —Phil Goodwin, Silicon Valley Patterns Group 10

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.