六个设计原则

less than 1 minute read

设计原则(Solid)

除了平时提的最多的这6个设计原则之外,平时提的最多的一个设计原则就是 【组合/聚合复用原则】 ;

组合/聚合复用原则 :面向对象的程序设计中,我们经常说“优先考虑使用组合来扩展类的功能,而不是使用继承,例如 代理模式、装饰器模式、适配器模式等设计模式”,这就是组合复用原则的应用;

cs

cs

A 35 year old developer who mainly uses Java as the development language, and has used other languages such as C, Dart, kotlin, and JS; It is precisely because I know that the world is vast that I hope to explore as widely as possible;

Comments

  Write a comment ...