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

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!

主站蜘蛛池模板: 仙居县| 德兴市| 祁阳县| 庐江县| 芜湖市| 喀喇沁旗| 垦利县| 新邵县| 福建省| 大丰市| 宁夏| 长白| 清新县| 德化县| 岑巩县| 海晏县| 保靖县| 东明县| 翼城县| 济宁市| 西贡区| 达孜县| 余姚市| 泸溪县| 遵义市| 南京市| 昌都县| 寿阳县| 封丘县| 昭通市| 丹棱县| 邢台市| 峡江县| 深圳市| 汝南县| 古蔺县| 兰坪| 白山市| 渑池县| 临桂县| 罗定市|