博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MVC介绍
阅读量:7171 次
发布时间:2019-06-29

本文共 1663 字,大约阅读时间需要 5 分钟。

hot3.png

##Model–view–controller

Model–view–controller (MVC) is a software pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.The central component, the model, consists of application data, business rules, logic, and functions. A view can be any output representation of information, such as a chart or a diagram. Multiple views of the same information are possible, such as a bar chart for management and a tabular view for accountants. The third part, the controller, accepts input and converts it to commands for the model or view.

##Component interactions

In addition to dividing the application into three kinds of components, the Model–view–controller (MVC) design defines the interactions between them. MVC

  • A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document).
  • A model notifies its associated views and controllers when there has been a change in its state. This notification allows the views to produce updated output, and the controllers to change the available set of commands. A passive implementation of MVC omits these notifications, because the application does not require them or the software platform does not support them.
  • A view requests information from the model that it needs for generating an output representation to the user

转载于:https://my.oschina.net/chen0dgax/blog/188566

你可能感兴趣的文章
[转]关于position 的 static、relative、absolute、fixed、inherit
查看>>
[转]SSIS cannot convert between unicode and non-unicode string
查看>>
【原创】构建高性能ASP.NET站点 第七章 如何解决内存的问题(前篇)—托管资源优化—垃圾回收机制深度剖析...
查看>>
通过orderby关键字,LINQ可以实现升序和降序排序。LINQ还支持次要排序。
查看>>
Flume-0.9.4数据插入HBase-0.96
查看>>
二八定律全面分析SEO全过程
查看>>
JSON未定义
查看>>
背包整理(1) 01,完全,多重
查看>>
Common Linux log files name and usage--reference
查看>>
getServletContext()接口解析(收藏)
查看>>
PHP和shell脚本遍历目录及其下子目录
查看>>
iOS中使用block传值
查看>>
设计模式序章
查看>>
委托和事件
查看>>
C++的那些事:类的拷贝控制
查看>>
Word中表格内容被遮挡
查看>>
linux下vi命令大全
查看>>
angular性能优化心得
查看>>
Report_矩阵报表的实现(案例)
查看>>
修改Eclipse/MyEclipse项目的默认编码
查看>>