Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
三层......前端,业务逻辑,数据后端。清洁 MVC 带来了什么?
谢谢
MVC 是一种用于使 UI 代码更易于维护的模式。您可以将业务逻辑封装在服务层和对数据层的数据访问。
在较大的应用程序中,MVC 只是 N 层架构的表示层。
从概念上讲,三层架构是线性的。然而,MVC 架构是三角形的:视图向控制器发送更新,控制器更新模型,视图直接从模型中更新。