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 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.160.131