五大基本原则简写为S.O.L.I.D。
the single responsiblitity principe
单一责任原则
一个类只负责一件事
the open closed principle
开放封闭原则
通过扩展实现新功能,不要修改老代码
the liskov substitution principle
里氏替换原则
子类对象必须能够替换掉父类对象
the interface segregation principle
接口分离原则
使用多个接口,不要把所有功能放到一个接口
the dependency inversion principle
依赖倒置原则
底层模块的修改,不要影响到上层模块