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

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!

主站蜘蛛池模板: 庐江县| 左权县| 双桥区| 玛沁县| 广丰县| 庆阳市| 永安市| 新龙县| 平和县| 开平市| 琼结县| 喀喇| 桦川县| 万载县| 杭锦后旗| 余干县| 昌邑市| 遂平县| 中江县| 阳江市| 遂平县| 上虞市| 临汾市| 台安县| 霍城县| 西城区| 嘉义县| 聂拉木县| 楚雄市| 鄂托克旗| 沙雅县| 伽师县| 潜江市| 黎川县| 天水市| 延安市| 永丰县| 银川市| 青阳县| 台湾省| 韶关市|