O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Refactoring for Software Design Smells

Book Description

Awareness of design smells – indicators of common design problems – helps developers or software engineers understand mistakes made while designing, what design principles were overlooked or misapplied, and what principles need to be applied properly to address those smells through refactoring. Developers and software engineers may "know" principles and patterns, but are not aware of the "smells" that exist in their design because of wrong or mis-application of principles or patterns. These smells tend to contribute heavily to technical debt – further time owed to fix projects thought to be complete – and need to be addressed via proper refactoring.

Refactoring for Software Design Smells presents 25 structural design smells, their role in identifying design issues, and potential refactoring solutions. Organized across common areas of software design, each smell is presented with diagrams and examples illustrating the poor design practices and the problems that result, creating a catalog of nuggets of readily usable information that developers or engineers can apply in their projects. The authors distill their research and experience as consultants and trainers, providing insights that have been used to improve refactoring and reduce the time and costs of managing software projects. Along the way they recount anecdotes from actual projects on which the relevant smell helped address a design issue.
  • Contains a comprehensive catalog of 25 structural design smells (organized around four fundamental design principles) that contribute to technical debt in software projects
  • Presents a unique naming scheme for smells that helps understand the cause of a smell as well as points toward its potential refactoring
  • Includes illustrative examples that showcase the poor design practices underlying a smell and the problems that result
  • Covers pragmatic techniques for refactoring design smells to manage technical debt and to create and maintain high-quality software in practice
  • Presents insightful anecdotes and case studies drawn from the trenches of real-world projects

Table of Contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Dedication
  6. Foreword by Grady Booch
  7. Foreword by Dr. Stéphane Ducasse
  8. Preface
  9. Acknowledgments
  10. Chapter 1. Technical Debt
    1. 1.1. What is Technical Debt?
    2. 1.2. What Constitutes Technical Debt?
    3. 1.3. What is the Impact of Technical Debt?
    4. 1.4. What causes technical debt?
    5. 1.5. How to Manage Technical Debt?
  11. Chapter 2. Design Smells
    1. 2.1. Why Care About Smells?
    2. 2.2. What Causes Smells?
    3. 2.3. How to address smells?
    4. 2.4. What Smells Are Covered in This Book?
    5. 2.5. A Classification of Design Smells
  12. Chapter 3. Abstraction Smells
    1. 3.1. Missing Abstraction
    2. 3.2. Imperative Abstraction
    3. 3.3. Incomplete Abstraction
    4. 3.4. Multifaceted Abstraction
    5. 3.5. Unnecessary Abstraction
    6. 3.6. Unutilized Abstraction
    7. 3.7. Duplicate Abstraction
  13. Chapter 4. Encapsulation Smells
    1. 4.1. Deficient Encapsulation
    2. 4.2. Leaky Encapsulation
    3. 4.3. Missing Encapsulation
    4. 4.4. Unexploited Encapsulation
  14. Chapter 5. Modularization Smells
    1. 5.1. Broken Modularization
    2. 5.2. Insufficient Modularization
    3. 5.3. Cyclically-Dependent Modularization
    4. 5.4. Hub-like Modularization
  15. Chapter 6. Hierarchy Smells
    1. 6.1. Missing Hierarchy
    2. 6.2. Unnecessary Hierarchy
    3. 6.3. Unfactored Hierarchy
    4. 6.4. Wide Hierarchy
    5. 6.5. Speculative Hierarchy
    6. 6.6. Deep Hierarchy
    7. 6.7. Rebellious Hierarchy
    8. 6.8. Broken Hierarchy
    9. 6.9. Multipath Hierarchy
    10. 6.10. Cyclic Hierarchy
  16. Chapter 7. The Smell Ecosystem
    1. 7.1. The Role of Context
    2. 7.2. Interplay of Smells
  17. Chapter 8. Repaying Technical Debt in Practice
    1. 8.1. The Tools
    2. 8.2. The Process
    3. 8.3. The people
  18. Appendix A. Software Design Principles
  19. Appendix B. Tools for Repaying Technical Debt
  20. Appendix C. Notations for Figures
  21. Appendix D. Suggested Reading
  22. Bibliography
  23. Index