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

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.

主站蜘蛛池模板: 偏关县| 伊川县| 揭东县| 疏附县| 祁东县| 镇江市| 孝义市| 临颍县| 石泉县| 广东省| 吉林省| 麦盖提县| 武汉市| 阜新市| 江西省| 临沭县| 桦甸市| 金湖县| 赫章县| 咸阳市| 措美县| 来安县| 新竹县| 富宁县| 永昌县| 孙吴县| 松原市| 大竹县| 浪卡子县| 香格里拉县| 土默特右旗| 池州市| 镇远县| 阿拉善右旗| 天镇县| 安塞县| 临沂市| 苍南县| 昌吉市| 清原| 县级市|