官术网_书友最值得收藏!

Preface

Howdy! This book intends to be a hands-on introduction to dependency injection with Go. It may surprise you to learn that there are many different methods for applying dependency injection available in the Go language and, in this book, we will discuss six different and occasionally complementary options.

Dependency injection, like many software engineering concepts, is easily and often misunderstood, so this text seeks to address that. It delves into related concepts, such as the principles of SOLID, code smells, and test-induced damage, so as to offer a broader and more practical view.

The aim of Hands-On Dependency Injection in Go is not only to teach you how to apply dependency injection, but also when, where, and when not to. Each of the methods is clearly defined; we discuss its advantages and disadvantages, and when the method is best applied. Also, each method is applied step by step using significant examples.

As much as I love dependency injection, it's not always the right tool for the job. This book will also help you spot situations where applying dependency injection is perhaps not the best option.

As each dependency injection method is introduced, I would ask you to pause for a moment, step back, and consider the following. What problem is the technique trying to resolve? And what would your code look like after you apply this method? Don't worry if the answers to these questions don't come quickly; by the end of the book, they will.

Happy coding!

主站蜘蛛池模板: 廉江市| 昌邑市| 浮梁县| 陈巴尔虎旗| 遵化市| 牟定县| 建阳市| 周口市| 大关县| 施甸县| 泽州县| 大新县| 苍山县| 冀州市| 福泉市| 宝应县| 久治县| 阳新县| 读书| 客服| 全南县| 汶川县| 和平县| 托克托县| 灵台县| 景德镇市| 娄烦县| 磐石市| 营山县| 华容县| 邵武市| 邢台市| 樟树市| 洞口县| 葵青区| 麻江县| 临澧县| 琼海市| 儋州市| 石阡县| 穆棱市|