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

  • JavaScript:Moving to ES2015
  • Ved Antani Simon Timms Narayan Prusty
  • 164字
  • 2021-07-09 19:07:39

Model-View-ViewModel

MVVM was originally coined by Microsoft for use with Windows Presentation Foundation (WPF) and Silverlight. MVVM is a variation of MVC and MVP and further tries to separate the user interface (view) from the business model and application behavior. MVVM creates a new model layer in addition to the domain model that we discussed in MVC and MVP. This model layer adds properties as an interface for the view. Let's say that we have a checkbox on the UI. The state of the checkbox is captured in an IsChecked property. In MVP, the view will have this property and the presenter will set it. However, in MVVM, the presenter will have the IsChecked property and the view is responsible for syncing with it. Now that the presenter is not really doing the job of a classical presenter, it's renamed as ViewModel:

Implementation details of these approaches are dependent on the problem that we are trying to solve and the framework that we use.

主站蜘蛛池模板: 富裕县| 福建省| 沙洋县| 工布江达县| 缙云县| 宁都县| 安丘市| 本溪市| 宁蒗| 平舆县| 石楼县| 兴海县| 江陵县| 司法| 根河市| 三门县| 江永县| 陆丰市| 合山市| 固安县| 高密市| 陆河县| 丽江市| 塔城市| 泌阳县| 宁德市| 修水县| 汪清县| 栾城县| 柯坪县| 南投市| 教育| 通辽市| 濉溪县| 阿荣旗| 科技| 瓦房店市| 平武县| 栾川县| 元阳县| 寿光市|