Refactoring for Software Design Smells (eBook)
258 Seiten
Elsevier Science (Verlag)
978-0-12-801646-6 (ISBN)
Girish Suryanarayana is currently a Senior Research Scientist at Research and Technology Center, Siemens Technology and Services Pvt. Ltd. Bangalore, India. At Siemens, he is involved in providing architectural guidance to software development teams, pursuing research in topics related to software architecture and cloud computing, and conducting internal software design and architecture training. Girish is a member of the IEEE Software Advisory Board and is the General Chair for the IEEE Software Experts Summit 2014 conference. He actively contributes to software engineering conferences. In 2013, he was on the program committee for the Software Engineering In Practice (SEIP) track at the 35th International Conference on Software Engineering (ICSE). Girish received a PhD in Information and Computer Science from the University of California, Irvine, in 2007. His research interests include software architecture, design patterns, design smells, refactoring, cloud computing, and reputation-based trust management systems. He is an IEEE-certified Software Engineering Certified Instructor (SECI) and regularly conducts training for the IEEE SWEBOK Certificate Program (SCP) and IEEE Certified Software Development Associate (CSDA) programs. He has also helped contribute course material for the IEEE's SWEBOK Certificate Program (SCP). He is regularly invited by local universities to deliver guest lectures on software architecture and design topics. Additionally, he is the General Chair for IEEE SES (Software Expert Summit) 2014 which is being organized by IEEE Software.
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 "e;know"e; principles and patterns, but are not aware of the "e;smells"e; 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 designprinciples) 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 pointstoward its potential refactoring- Includes illustrative examples that showcase the poor design practices underlying a smell and the problemsthat result- Covers pragmatic techniques for refactoring design smells to manage technical debt and to create and maintainhigh-quality software in practice- Presents insightful anecdotes and case studies drawn from the trenches of real-world projects
Front
1
Refactoring for
4
Copyright 5
Dedication 6
Contents 8
Foreword by Grady Booch 10
Foreword by Dr. Stéphane Ducasse 12
Preface 14
WHAT IS THIS BOOK ABOUT? 14
WHAT DOES THIS BOOK COVER? 14
WHO SHOULD READ THIS BOOK? 15
WHAT ARE THE PREREQUISITES FOR READING THIS BOOK? 16
HOW TO READ THIS BOOK? 16
WHERE CAN I FIND MORE INFORMATION? 17
WHY DID WE WRITE THIS BOOK? 18
Acknowledgments 20
Chapter 1 - Technical Debt 22
1.1 WHAT IS TECHNICAL DEBT? 23
1.2 WHAT CONSTITUTES TECHNICAL DEBT? 23
1.3 WHAT IS THE IMPACT OF TECHNICAL DEBT? 25
1.4 WHAT CAUSES TECHNICAL DEBT? 27
1.5 HOW TO MANAGE TECHNICAL DEBT? 28
Chapter 2 - Design Smells 30
2.1 WHY CARE ABOUT SMELLS? 31
2.2 WHAT CAUSES SMELLS? 33
2.3 HOW TO ADDRESS SMELLS? 36
2.4 WHAT SMELLS ARE COVERED IN THIS BOOK? 36
2.5 A CLASSIFICATION OF DESIGN SMELLS 36
Chapter 3 - Abstraction Smells 42
3.1 MISSING ABSTRACTION 45
3.2 IMPERATIVE ABSTRACTION 50
3.3 INCOMPLETE ABSTRACTION 55
3.4 MULTIFACETED ABSTRACTION 61
3.5 UNNECESSARY ABSTRACTION 65
3.6 UNUTILIZED ABSTRACTION 70
3.7 DUPLICATE ABSTRACTION 75
Chapter 4 - Encapsulation Smells 82
4.1 DEFICIENT ENCAPSULATION 84
4.2 LEAKY ENCAPSULATION 93
4.3 MISSING ENCAPSULATION 99
4.4 UNEXPLOITED ENCAPSULATION 107
Chapter 5 - Modularization Smells 114
5.1 BROKEN MODULARIZATION 117
5.2 INSUFFICIENT MODULARIZATION 123
5.3 CYCLICALLY-DEPENDENT MODULARIZATION 129
5.4 HUB-LIKE MODULARIZATION 139
Chapter 6 - Hierarchy Smells 144
6.1 MISSING HIERARCHY 148
6.2 UNNECESSARY HIERARCHY 155
6.3 UNFACTORED HIERARCHY 161
6.4 WIDE HIERARCHY 171
6.5 SPECULATIVE HIERARCHY 175
6.6 DEEP HIERARCHY 178
6.7 REBELLIOUS HIERARCHY 184
6.8 BROKEN HIERARCHY 194
6.9 MULTIPATH HIERARCHY 203
6.10 CYCLIC HIERARCHY 208
Chapter 7 - The Smell Ecosystem 214
7.1 THE ROLE OF CONTEXT 214
7.2 INTERPLAY OF SMELLS 217
Chapter 8 - Repaying Technical Debt in Practice 224
8.1 THE TOOLS 224
8.2 THE PROCESS 227
8.3 THE PEOPLE 233
Appendix A - Software Design Principles 234
A.1 ABSTRACTION 234
A.2 ACYCLIC DEPENDENCIES PRINCIPLE 234
A.3 DON’T REPEAT YOURSELF PRINCIPLE 234
A.4 ENCAPSULATION 235
A.5 INFORMATION HIDING PRINCIPLE 235
A.6 KEEP IT SIMPLE SILLY 235
A.7 LISKOV’S SUBSTITUTION PRINCIPLE 235
A.8 HIERARCHY 236
A.9 MODULARIZATION 236
A.10 OPEN/CLOSE PRINCIPLE 236
A.11 SINGLE RESPONSIBILITY PRINCIPLE 236
A.12 VARIATION ENCAPSULATION PRINCIPLE 236
Appendix B - Tools for Repaying Technical Debt 238
Appendix C - Notations for Figures 244
Appendix D - Suggested Reading 246
D.1 ESSENTIALS 246
D.2 REFACTORING AND REENGINEERING 246
D.3 PATTERNS AND ANTI-PATTERNS 247
D.4 TECHNICAL DEBT 247
Bibliography 248
Index 252
Technical Debt
Abstract
Technical debt is the debt that accrues when developers knowingly or unknowingly make wrong or nonoptimal design decisions. Technical debt is akin to financial debt. Allowing a small debt to occur is acceptable provided it is paid soon enough; not paying the debt for a longer period invites bigger troubles. Similarly, in a software project, technical debt needs to be repaid regularly to avoid its accumulation. Large technical debt significantly degrades the quality of the software system and affects the productivity of the development team. In extreme cases, when the accumulated technical debt becomes so huge that it cannot be paid off anymore, the product has to be abandoned. This chapter emphasizes the importance of the concept of technical debt, the factors that contribute to it, and its impact on software projects.
Keywords
Causes of technical debt; Design debt; Project failures; Refactoring; Technical bankruptcy; Technical debt
Design smells are certain structures in the design that indicate violation of fundamental design principles and negatively impact design quality.
1.1. What is Technical Debt?
Technical debt is the debt that accrues when you knowingly or unknowingly make wrong or non-optimal design decisions.
1.2. What Constitutes Technical Debt?
FIGURE 1.1 Dimensions of technical debt.
1.3. What is the Impact of Technical Debt?
| Erscheint lt. Verlag | 31.10.2014 |
|---|---|
| Sprache | englisch |
| Themenwelt | Mathematik / Informatik ► Informatik ► Programmiersprachen / -werkzeuge |
| Mathematik / Informatik ► Informatik ► Software Entwicklung | |
| ISBN-10 | 0-12-801646-9 / 0128016469 |
| ISBN-13 | 978-0-12-801646-6 / 9780128016466 |
| Informationen gemäß Produktsicherheitsverordnung (GPSR) | |
| Haben Sie eine Frage zum Produkt? |
Kopierschutz: Adobe-DRM
Adobe-DRM ist ein Kopierschutz, der das eBook vor Mißbrauch schützen soll. Dabei wird das eBook bereits beim Download auf Ihre persönliche Adobe-ID autorisiert. Lesen können Sie das eBook dann nur auf den Geräten, welche ebenfalls auf Ihre Adobe-ID registriert sind.
Details zum Adobe-DRM
Dateiformat: EPUB (Electronic Publication)
EPUB ist ein offener Standard für eBooks und eignet sich besonders zur Darstellung von Belletristik und Sachbüchern. Der Fließtext wird dynamisch an die Display- und Schriftgröße angepasst. Auch für mobile Lesegeräte ist EPUB daher gut geeignet.
Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen eine
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen eine
Geräteliste und zusätzliche Hinweise
Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.
aus dem Bereich