在MVC structre中哪一层用于编辑/更新数据? [英] In MVC structre which layer is used for editing/updating data?

查看:66
本文介绍了在MVC structre中哪一层用于编辑/更新数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

n三层中的MVC结构(Model-View-Controler),其中一个用于数据编辑(如三层架构中的数据层)?

n MVC structure among that three layers(Model-View-Controler) which one is used for data editing (like data tier in three tier architecture)?

推荐答案

控制器管理模型和视图之间的数据

model-for data

view-for presentation
Controller-manage data between model and view
model-for data
view-for presentation


模型管理应用程序域的行为和数据,响应有关其状态的信息请求(通常来自视图),并响应更改状态的指令(通常来自控制器)。



查看管理信息的显示。



控制器解释鼠标和键盘来自用户的输入,通知模型和/或视图根据需要进行更改。
Model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller).

View manages the display of information.

Controller interprets the mouse and keyboard inputs from the user, informing the model and/or the view to change as appropriate.


模型是视图所需的数据

查看仅用于显示您的数据。

控制器负责处理r equest>



例如,当用户向服务器发送请求以获取某些数据时。第一个控制器处理从服务器获取数据的请求,并将该数据集提供给模型,然后模型返回到视图。
Model is the data to needed for the view
View is only for displaying your data nothing more than that.
Controller is responsible for handling request and response.

For example when an user send an request to a server for getting some data. First Controller process the request for fetching data from server and that data set to the model and then model return to the view.


这篇关于在MVC structre中哪一层用于编辑/更新数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆