Hands-On Dependency Injection in Go: Produce clean and loosely coupled Go code that is easier to read, maintain, test and extend

Hands-On Dependency Injection in Go: Produce clean and loosely coupled Go code that is easier to read, maintain, test and extend

作者: Corey Scott
出版社: Packt Publishing
出版在: 2018-11-28
ISBN-13: 9781789132762
ISBN-10: 1789132762
裝訂格式: Paperback
總頁數: 346 頁





內容描述


Dependency Injection in Go, often considered to be tedious, made easy with this comprehensive guide
Key Features

Gain an in-depth insight into Dependency Injection and the SOLID principles
Learn how to refactor existing code to adopt Dependency Injection using several of the methods available in Go.
Discover how to design a system from scratch to support Dependency Injection and also Dependency Injection anti-patterns.

Book Description
Go simplifies the process of building steadfast and well-organized software. Leverage Dependency Injection and Testings to produce clean, loosely coupled Go code that is inherently easier to read, maintain, test and extend.
Hands-On Dependency Injection and Testing in Go is an in-depth guide to Dependency Injection and the SOLID principles for Go. It will take you on a journey to refactor existing code to adopt Dependency Injection using several methods available in Go. Each method is explained in detail, focusing on their strengths and weakness and with the help of examples, and you will gain knowledge on how to best leverage the method to transform the code into something simple and flexible. Moving ahead, you will learn how to incorporate the dependency graph to spot and eliminate issues. The book will educate you on the techniques involved in using Dependency Injection with test stubs and mocks to test otherwise difficult or impossible scenarios and achieve thorough unit test coverage.
Finally, we will talk about how to design a system from scratch to support Dependency Injection and also Dependency Injection anti-patterns.
What you will learn

Understand the benefits of Dependency Injection.
Explore several Dependency Injection patterns in Go.
Learn to leverage Dependency Injection to produce high quality, loosely coupled and thoroughly tested Go code.
Gain insight on how to refactor existing Go code to use Dependency Injection.
Learn to design a Go new package or system to use Dependency Injection

Who This Book Is For
Programmers with a few years experience in any language and a basic understanding of Go who wish to produce clean, loosely coupled code.




相關書籍

互動式網站前台開發 - Base on HTML5 , CSS3 & jQuery

作者 陳聖博

2018-11-28

Pro Apache Hadoop, 2/e (Paperback)

作者 Jason Venner Sameer Wadkar Madhu Siddalingaiah

2018-11-28

Mobile Web 程式設計, 2/e (內容包含 HTML5) (Programming the Mobile Web, 2/e)

作者 Maximiliano Firtman 賴屹民 譯

2018-11-28