WEB--MVC架构

  1. MVC Components

(1)View——处理UI

Displays data to user in easy-to-understand format that is suitable for the device (HTML, CSS and templates模板).

以适合设备的易于理解的格式(HTML、CSS和模板)向用户显示数据。

Communicates with the Controller: user actions create requests to the application.

与控制器通信:用户操作创建对应用程序的请求。

(2)Controller——处理请求

Processes the requests, updates the model, gets data from the model, passes data back to the view.

处理请求、更新模型、从模型获取数据、将数据传递回视图。

(3)Model——处理数据模型

Maintains the data model of the application and the application logic

but communicates with the controller.

The model doesn't communicate directly with the view.

维护应用程序的数据模型和应用程序逻辑

但与控制器通信。

模型不直接与视图通信。

        模型中的类表示系统操作的实体。每个类都有,通过分组与实体相关的数据和操作来表示某种实体。视图的实现允许用户与系统的各个方面进行交互,并执行不同的任务。更改视图对其他组件几乎没有影响。控制器中的类表示系统执行的各种任务(用例)。控制器封装了执行任务所需的逻辑。

  • 6
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

*张小杨*

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

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

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

打赏作者

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

抵扣说明:

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

余额充值