分层架构设计模式(Layered Architecture Pattern), 也叫做多层设计模式(n-tier architecture pattern)。
其实分层的方法在实际生活种随处可见:
比如组织架构,村委会 – 县委会 – 市委 – 省委,就是一级一级的汇 和管理关系。
还比如,供应商管理上经常说的 tier-1, tier-2,也是层次关系,从tier-1采购的东西,可能里面零件是从tier-2那里采购的。
还有就是公司内部的业务,也是一层层的推进汇 ,比如市场部负责产品可行性研究,之后开发部做出原型并开发成品,然后生产部进行生产。
所以分层架构设计模式,本来就很匹配很多公司里面的传统IT通信和组织架构,就适合很多企业应用。
比如现在很多企业里用的软件应用,都是分为表现层,业务层和数据层,Presentation layer, business logic layer, data access layer。
Architectures have the same objective — the separation of concerns. They all achieve it by dividing the software into layers. — Uncle Bob
Why Divide the Application into Layers
-
Maintains the Single Responsibility Principle.
-
Follows Separation of Concerns.
-
Isolates development roles & skills. (Presentation Layer — FE dev, Business Layer — BE dev)
-
Supports multiple implementations. (Interchangeable Presentation Layer)
-
Varying rates of change.
-
Slices application to more manageable units.
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!