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

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.

主站蜘蛛池模板: 旅游| 仁怀市| 钦州市| 安仁县| 屏东县| 鹤岗市| 滦南县| 宁武县| 北京市| 腾冲县| 元谋县| 商城县| 四平市| 永登县| 上饶市| 类乌齐县| 龙海市| 蛟河市| 威远县| 竹北市| 汉川市| 祁阳县| 台北市| 丰城市| 辰溪县| 紫阳县| 阿克陶县| 新建县| 合山市| 长武县| 保定市| 紫阳县| 商河县| 莱阳市| 紫云| 石台县| 三原县| 屯门区| 余庆县| 且末县| 同仁县|