类设计的原则(可扩展、可复用、可理解):solid
组件拆分原则(可复用、可维护)
erp(reuse/release equivalence principle), the granule of reuse is the granule of release
ccp (common closure principle) , gather those classes into a component that change for the same reason
crp (common reuse principle) don’t force users of components to depend on the things the don’t need
依赖关系原则(考虑稳定性)
adp (acyclic dependencies principle) the dependency graph of packages or components should have no cycles
sdp (stable dependencies principle) depend in the direction of stability(不稳定性=出度/(入度+出度))
sap (stable abstractions principle)a component should be as abstract as it is stable
系统由逻辑和细节组成,逻辑分为业务逻辑及控制逻辑
逻辑和细节可以实现为一组组件
组件有高低层次,距离输入输出越近,层次越低
低层次组件要依赖高层次组件,可以通过接口实现
跨边界的数据结构也解耦,重新定义一个独立、简单的数据结构
强大的可测性是一个架构设计是否优秀的显著衡量标准之一
网友评论 (15)