Introduction 介绍

The "SOLID" design principles, articulated by Robert "Uncle Bob" Martin, are five principles that provide a good foundation for sound application design. The five principles are:

罗伯特“鲍勃叔叔”马丁阐述了名为“坚实”的一些设计原则(译者注:看下面五个原则的首字母正是 SOLID )。这些都是制作完善的程序设计的优秀基础,一共有五个原则:

  • The Single Responsibility Principle 单一职责原则
  • The Open Closed Principle 开放封闭原则
  • The Liskov Substitution Principle 里氏替换原则
  • The Interface Segregation Principle 接口隔离原则
  • The Dependency Inversion Principle 依赖反转原则

Let's explore each of these principles in more depth, and look at some code examples illustrating each principle. As we will see, each principle compliments the others, and if one principle falls, most, if not all, of the others do as well.


results matching ""

    No results matching ""