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

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 
主站蜘蛛池模板: 瓦房店市| 烟台市| 绥滨县| 阳谷县| 禹城市| 太原市| 高州市| 外汇| 宁化县| 五大连池市| 通化市| 得荣县| 辽阳市| 丘北县| 凤山市| 安福县| 石门县| 竹溪县| 扎囊县| 邮箱| 长岛县| 鄂托克前旗| 星子县| 马山县| 新邵县| 永川市| 双柏县| 鄄城县| 漯河市| 乌拉特中旗| 托克逊县| 浑源县| 嘉定区| 余姚市| 荃湾区| 南部县| 彭山县| 浦江县| 花莲市| 稻城县| 赣榆县|