- 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
推薦閱讀
- 兩周自制腳本語言
- 基于Java技術(shù)的Web應(yīng)用開發(fā)
- 從0到1:HTML+CSS快速上手
- PHP+MySQL+Dreamweaver動態(tài)網(wǎng)站開發(fā)實例教程
- 人人都懂設(shè)計模式:從生活中領(lǐng)悟設(shè)計模式(Python實現(xiàn))
- Learn React with TypeScript 3
- D3.js 4.x Data Visualization(Third Edition)
- AppInventor實踐教程:Android智能應(yīng)用開發(fā)前傳
- Angular開發(fā)入門與實戰(zhàn)
- C語言程序設(shè)計實驗指導(dǎo) (第2版)
- Python之光:Python編程入門與實戰(zhàn)
- 區(qū)塊鏈技術(shù)與應(yīng)用
- C/C++程序員面試指南
- Mastering Apache Storm
- Julia數(shù)據(jù)科學(xué)應(yīng)用