- Hands-On Dependency Injection in Go
- Corey Scott
- 78字
- 2021-06-10 19:17:48
How does this relate to DI?
Dependency inversion is very easy to mistake for dependency injection, and many, including me for a long time, assume that they are equivalent. But as we have seen, dependency inversion focuses on the ownership of the dependencies' abstract definition, and DI is focused on using those abstractions.
By applying DIP with DI, we end up with very well-decoupled packages that are incredibly easy to understand, easy to extend, and simple to test.
推薦閱讀
- 極簡算法史:從數學到機器的故事
- The DevOps 2.3 Toolkit
- AngularJS Testing Cookbook
- Mastering Swift 2
- RabbitMQ Essentials
- Building Android UIs with Custom Views
- Instant PHP Web Scraping
- Android驅動開發權威指南
- Kotlin開發教程(全2冊)
- Nagios Core Administration Cookbook(Second Edition)
- 從0到1:HTML5 Canvas動畫開發
- Mastering Concurrency Programming with Java 9(Second Edition)
- JavaScript編程精解(原書第2版)
- Android技術內幕(系統卷)
- 嵌入式C編程實戰