- Hands-On Dependency Injection in Go
- Corey Scott
- 119字
- 2021-06-10 19:17:46
SOLID Design Principles for Go
In 2002, Robert "Uncle Bob" Martin published the book Agile Software Development, Principles, Patterns, and Practices in which he defined the five principles of reusable programs, which he called SOLID principles. While it might seem strange to include these principles in a book about a programming language invented 10 years later, these principles are still relevant today.
In this chapter, we will briefly examine each of these principles, how they relate to dependency injection (DI) and what that means for Go. SOLID is an acronym for five popular object-oriented software design principles:
- Single responsibility principle
- Open/closed principle
- Liskov substitution principle
- Interface segregation principle
- Dependency inversion principle
推薦閱讀
- 程序員修煉之道:程序設(shè)計(jì)入門30講
- Android和PHP開(kāi)發(fā)最佳實(shí)踐(第2版)
- PaaS程序設(shè)計(jì)
- SEO智慧
- HTML5+CSS3網(wǎng)站設(shè)計(jì)基礎(chǔ)教程
- JavaScript入門經(jīng)典
- C語(yǔ)言程序設(shè)計(jì)
- 深入分布式緩存:從原理到實(shí)踐
- TMS320LF240x芯片原理、設(shè)計(jì)及應(yīng)用
- Illustrator CC平面設(shè)計(jì)實(shí)戰(zhàn)從入門到精通(視頻自學(xué)全彩版)
- ExtJS Web應(yīng)用程序開(kāi)發(fā)指南第2版
- 區(qū)塊鏈項(xiàng)目開(kāi)發(fā)指南
- Oracle數(shù)據(jù)庫(kù)編程經(jīng)典300例
- 進(jìn)入IT企業(yè)必讀的324個(gè)Java面試題
- Akka入門與實(shí)踐