官术网_书友最值得收藏!

The Model-View-Controller pattern

Each component of the MVC pattern fills a very specific purpose in separating data within an application from user interaction with the data. The following is a very brief introduction to the components of the MVC design pattern.

The controller

In the MVC pattern, the controller acts as a delegator. It submits modifications to the model on behalf of some external interaction (typically a user), and retrieves data for a view as the result of a notification or direct request via user interaction.

The view

Views handle the presentation of the data to some external entity. If a view contains logic, that logic is limited to the presentation of the data it received from the controller as the result of an interaction with the model.

The model

The model is the encapsulation of application-specific data, and the means by which to store, retrieve, and maintain the integrity of that data. The model may or may not mimic the structure in which the actual data is stored or presented.

主站蜘蛛池模板: 独山县| 桃江县| 康定县| 敦化市| 郓城县| 嘉定区| 凤庆县| 筠连县| 新泰市| 厦门市| 内丘县| 喀什市| 宁陕县| 双桥区| 无极县| 千阳县| 新密市| 天柱县| 中阳县| 化州市| 栾城县| 化州市| 合水县| 肥乡县| 桑植县| 喜德县| 九台市| 高青县| 稻城县| 治县。| 曲麻莱县| 海安县| 临沭县| 潍坊市| 怀化市| 东平县| 五河县| 天门市| 广州市| 青岛市| 太原市|