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

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.

主站蜘蛛池模板: 鹰潭市| 精河县| 卫辉市| 内丘县| 平定县| 阳城县| 安远县| 邵武市| 同心县| 临澧县| 邯郸县| 华亭县| 张北县| 郴州市| 那曲县| 凤庆县| 尚义县| 柳州市| 吴江市| 乌审旗| 台南县| 高台县| 聂拉木县| 夏河县| 三都| 阿克苏市| 玉龙| 凌海市| 蒙阴县| 玉田县| 清涧县| 浮梁县| 莫力| 铜川市| 西乌珠穆沁旗| 康平县| 旌德县| 玛曲县| 华池县| 扎鲁特旗| 凤阳县|