- Hands-On Dependency Injection in Go
- Corey Scott
- 67字
- 2021-06-10 19:17:46
How does this relate to DI?
When applying DI to our code, we are unsurprisingly injecting our dependencies, typically in the form of a function parameter. If you see a function with many injected dependencies, this is a likely sign that the method is doing too much.
Additionally, applying SRP will inform our object design. As such, this helps us identify when and where to use DI.
推薦閱讀
- C++程序設計(第3版)
- Mastering matplotlib
- Rust Essentials(Second Edition)
- Natural Language Processing with Java and LingPipe Cookbook
- Learning Material Design
- Android傳感器開發與智能設備案例實戰
- SQL Server 2008 R2數據庫技術及應用(第3版)
- Mastering Docker
- Web Developer's Reference Guide
- Python Projects for Kids
- JavaWeb從入門到精通(視頻實戰版)
- 一步一步學Spring Boot:微服務項目實戰(第2版)
- Mastering Data Analysis with R
- C語言從入門到精通(第5版)
- Learning IBM Bluemix