软件的分层设计

分层架构设计模式(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

  1. Maintains the Single Responsibility Principle.

  2. Follows Separation of Concerns.

  3. Isolates development roles & skills. (Presentation Layer — FE dev, Business Layer — BE dev)

  4. Supports multiple implementations. (Interchangeable Presentation Layer)

  5. Varying rates of change.

  6. Slices application to more manageable units.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜流冰

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值