MVCVM

image

  • M

Models hold the actual data (various context, store or other methods)

  • V

Views display a certain shape of data. They have no idea where the data comes from.

  • C

Controllers listen for, and publish, events. Controllers provide the logic that controls what data is seen and where. Controllers provide the command code to the ViewModel so that the ViewModel is actually reusable.

用来,响应事件,控制ViewModelC是前端和后台的桥梁

  • VM

ViewModels hold a certain shape of data and commands, they do not know where the data, or code, comes from or how it is displayed.

主要是微软提的概念,把视图和数据的双向绑定以及一些绑定逻辑称为一个ViewModelVM是设计和前端的桥梁包括校验,交互等逻辑

results matching ""

    No results matching ""