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
  • 售價: $1,330
  • 貴賓價: 9.5$1,264
  • 語言: 英文
  • 頁數: 346
  • 裝訂: Paperback
  • ISBN: 1789132762
  • ISBN-13: 9781789132762
  • 相關分類: Go 程式語言
  • 立即出貨 (庫存=1)

買這商品的人也買了...

相關主題

商品描述

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.