Refactoring to Patterns Book Summary - Refactoring to Patterns Book explained in key points

Refactoring to Patterns summary

Joshua Kerievsky

Brief summary

Refactoring to Patterns by Joshua Kerievsky is a practical guide that demonstrates how to apply design patterns to refactor existing code. It offers valuable insights and techniques for improving the design and maintainability of software systems.

Give Feedback
Table of Contents

    Refactoring to Patterns
    Summary of key ideas

    Understanding the Relationship between Refactoring and Patterns

    In Refactoring to Patterns by Joshua Kerievsky, we are introduced to the concept of refactoring, a process of restructuring code without changing its external behavior. Kerievsky explains that refactoring is a crucial part of the software development process, as it helps maintain and improve the quality of code over time. He also emphasizes the importance of design patterns, which are proven solutions to recurring design problems in object-oriented software development.

    Kerievsky then delves into the relationship between refactoring and patterns, explaining that while refactoring focuses on improving the internal structure of code, patterns are used to solve specific design problems. He argues that the two concepts are not mutually exclusive, and in fact, they can complement each other to produce more efficient and maintainable code.

    Introducing Pattern-Directed Refactorings

    Building on this foundation, Kerievsky introduces the concept of pattern-directed refactorings. These are sequences of low-level refactorings that allow developers to safely move designs towards, away from, or to a pattern implementation. He emphasizes that pattern-directed refactorings are not just about implementing patterns, but also about understanding the forces that lead to patterns and how to work with them effectively.

    To illustrate this concept, Kerievsky presents a catalog of twenty-seven pattern-directed refactorings, each supported by real-world code examples. These refactorings cover a wide range of design patterns, including creational, structural, and behavioral patterns. He also introduces twelve design smells that indicate the need for these refactorings, helping developers identify when patterns should be applied.

    Implementing Patterns in the Simplest Possible Ways

    One of the key insights in Refactoring to Patterns is the idea that there are multiple ways to implement the same pattern, and it is essential to choose the simplest possible way. Kerievsky explains that simplicity is crucial for maintainability, and overly complex pattern implementations can lead to increased technical debt. He provides practical guidance on how to identify and implement the simplest pattern solutions for a given problem.

    Furthermore, Kerievsky discusses the practical aspects of implementing pattern-directed refactorings, addressing concerns such as testing, performance, and collaboration. He emphasizes the importance of incremental change, suggesting that developers should make small, safe steps towards pattern implementations rather than attempting large, risky changes all at once.

    Bringing It All Together

    In the final sections of the book, Kerievsky brings together the concepts of refactoring and patterns to provide a comprehensive approach to software design. He discusses the role of patterns in agile development, emphasizing the need for flexibility and adaptability in pattern implementations. He also addresses common objections and misconceptions about patterns and refactoring, helping readers understand how these concepts can be applied in real-world development scenarios.

    In conclusion, Refactoring to Patterns by Joshua Kerievsky offers a unique perspective on the relationship between refactoring and patterns. By combining these two concepts, Kerievsky provides developers with a powerful approach to improving the design and maintainability of their code. The book is a valuable resource for anyone seeking to deepen their understanding of software design and development practices.

    Give Feedback
    How do we create content on this page?
    More knowledge in less time
    Read or listen
    Read or listen
    Get the key ideas from nonfiction bestsellers in minutes, not hours.
    Find your next read
    Find your next read
    Get book lists curated by experts and personalized recommendations.
    Shortcasts
    Shortcasts New
    We’ve teamed up with podcast creators to bring you key insights from podcasts.

    What is Refactoring to Patterns about?

    Refactoring to Patterns by Joshua Kerievsky is a practical guide that demonstrates how to apply design patterns to refactor existing code. It provides real-world examples and step-by-step instructions to help software developers improve the design, maintainability, and extensibility of their codebase. By combining the concepts of refactoring and design patterns, this book offers valuable insights for creating high-quality software.

    Refactoring to Patterns Review

    Refactoring to Patterns (2004) introduces a practical approach to transforming code, making it a valuable resource for software developers. Here's why you should consider reading it:
    • Highlights the importance of refactoring techniques to enhance code quality and maintainability.
    • Offers insights into design patterns and how they can be effectively applied during the refactoring process.
    • Keeps readers engaged with real-world examples and useful strategies, ensuring a stimulating and insightful read.

    Who should read Refactoring to Patterns?

    • Software developers and engineers who want to improve their code design and architecture

    • Professionals looking to understand how to apply design patterns in a practical and incremental manner

    • Individuals interested in learning about refactoring techniques and their application to real-world software projects

    About the Author

    Joshua Kerievsky is a renowned software developer, author, and the founder of Industrial Logic, a company that specializes in software design and development. With a passion for refactoring and patterns, Kerievsky has made significant contributions to the field of software engineering. In addition to his book Refactoring to Patterns, he has also authored Refactoring in Ruby and has been a prominent speaker at various conferences, sharing his expertise on agile practices and software design.

    Categories with Refactoring to Patterns

    People ❤️ Blinkist 
    Sven O.

    It's highly addictive to get core insights on personally relevant topics without repetition or triviality. Added to that the apps ability to suggest kindred interests opens up a foundation of knowledge.

    Thi Viet Quynh N.

    Great app. Good selection of book summaries you can read or listen to while commuting. Instead of scrolling through your social media news feed, this is a much better way to spend your spare time in my opinion.

    Jonathan A.

    Life changing. The concept of being able to grasp a book's main point in such a short time truly opens multiple opportunities to grow every area of your life at a faster rate.

    Renee D.

    Great app. Addicting. Perfect for wait times, morning coffee, evening before bed. Extremely well written, thorough, easy to use.

    4.7 Stars
    Average ratings on iOS and Google Play
    36 Million
    Downloads on all platforms
    10+ years
    Experience igniting personal growth
    Powerful ideas from top nonfiction

    Try Blinkist to get the key ideas from 7,500+ bestselling nonfiction titles and podcasts. Listen or read in just 15 minutes.

    Get started

    Refactoring to Patterns FAQs 

    What is the main message of Refactoring to Patterns?

    The main message of Refactoring to Patterns is the importance of combining refactoring techniques with design patterns for improved software quality.

    How long does it take to read Refactoring to Patterns?

    Reading Refactoring to Patterns takes several hours. The Blinkist summary can be read in 15 minutes.

    Is Refactoring to Patterns a good book? Is it worth reading?

    Refactoring to Patterns is worth reading for its practical insights on enhancing code through patterns and refactoring.

    Who is the author of Refactoring to Patterns?

    The author of Refactoring to Patterns is Joshua Kerievsky.

    What to read after Refactoring to Patterns?

    If you're wondering what to read next after Refactoring to Patterns, here are some recommendations we suggest:
    • Big Data by Viktor Mayer-Schönberger and Kenneth Cukier
    • Physics of the Future by Michio Kaku
    • On Intelligence by Jeff Hawkins and Sandra Blakeslee
    • Brave New War by John Robb
    • Abundance# by Peter H. Diamandis and Steven Kotler
    • The Signal and the Noise by Nate Silver
    • You Are Not a Gadget by Jaron Lanier
    • The Future of the Mind by Michio Kaku
    • The Second Machine Age by Erik Brynjolfsson and Andrew McAfee
    • Out of Control by Kevin Kelly