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

Interactions – the behavior between the components

All these three mentioned components act in different ways when talking to each other. A model stores data it is being given from the controller based on commands. A view changes its appearance based on changes happening in the model. A controller can send a command to the model based on a user interaction. One such example is a user deciding to browse between page-based records. A new set of data will need to be retrieved based on the new visual position.

These two basic flows are what mostly happens in an application-based on MVC:

  • User interaction: Controller sends command to Model => Model changes => View is updated
  • View asks for data: Controller sends command to Model => Model is created/changed  => View is updated
主站蜘蛛池模板: 黑龙江省| 循化| 东丽区| 万山特区| 涿鹿县| 新绛县| 涞水县| 武山县| 巴中市| 巧家县| 揭阳市| 梁山县| 龙泉市| 安平县| 云安县| 瓦房店市| 博爱县| 忻州市| 张家界市| 班玛县| 太和县| 大邑县| 延吉市| 淅川县| 即墨市| 射洪县| 德令哈市| 黎城县| 塘沽区| 蕉岭县| 志丹县| 镇宁| 乌兰察布市| 屏东县| 西乌| 甘泉县| 施甸县| 岑溪市| 临安市| 容城县| 祁连县|