- Hands-On Dependency Injection in Go
- Corey Scott
- 144字
- 2021-06-10 19:17:44
Code smells that indicate you might need DI
The saying to a man with only a hammer, every problem looks like a nail is old and yet is never truer than in programming. As professionals, we should be continually striving to acquire more tools to be better equipped for whatever our job throws at us. DI, while a highly useful tool, is useful only for particular nails. In our case, these nails are code smells. Code smells are indications in the code of a potentially deeper problem.
There are many different types of code smell; in this section, we will examine only those that can be alleviated by DI. In later chapters, we will reference these smells as we attempt to remove them from our code.
Code smells generally fall into four different categories:
- Code bloat
- Resistance to change
- Wasted effort
- Tight coupling
推薦閱讀
- Building a RESTful Web Service with Spring
- JMeter 性能測試實戰(第2版)
- Oracle 12c中文版數據庫管理、應用與開發實踐教程 (清華電腦學堂)
- Python金融數據分析
- C語言程序設計實踐教程
- Visual C++數字圖像處理技術詳解
- 網站構建技術
- Python Data Structures and Algorithms
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- Cocos2d-x Game Development Blueprints
- 創意UI:Photoshop玩轉APP設計
- 監控的藝術:云原生時代的監控框架
- 視窗軟件設計和開發自動化:可視化D++語言
- 超好玩的Scratch 3.5少兒編程
- Spring Microservices