• 开闭原则(Open-ClosedPrinciple,COP): 一个实体类应该对外扩展开放,修改关闭。
  • 依赖倒置原则(Dependence Inversion Principle, DIP):高层模块不应该依赖底层模块,二者都应该依赖他们的抽象。
  • 单一职责原则(SimpleResponsibilityPrinciple, SRP):不要存在多于一个导致类变更的原因。旨在,我们修改一个功能的代码,不能影响另一个功能。
  • 接口隔离原则(InterfaceSegregationPrinciple,ISP);设计代码的时候,实现多个专门的接口,不将多个不同的功能放在一个接口里面,类对于另一个类的依赖要建立在最小的接口上。
  • 迪米特原则(LawofDemeter,LOD),一个对象应该对其他对象保持最少的了解,降低类与类之间的耦合
  • 里式替换原则(LiskowSubstitutionPrinciple,LSP),一个类如果适用于一个父类,那么一定适用于他的子类
  • 合成复用原则(Composite/AggregateReusePrinciple, CARP):尽量使用对象组合/聚合,而不是通过类与类的集成来达到软件复用的目的。

14 对 “软件架构设计原则(摘抄自Spring5核心原理)”的想法;

  1. Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!

  2. Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!

  3. Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!

  4. Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!

  5. Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!

  6. Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!

  7. Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!

发表评论

电子邮件地址不会被公开。