MVVM: Model-View-view model (Model-view-viewmodel)

Source: Internet
Author: User
Tags silverlight



Component model, View, ViewModel

View:ui interface

ViewModel: It is the abstraction of view, which is responsible for the information transformation between view and model, and transmits the command of view to model;

Model: Data Access Layer

View and Viewmodule connections can be done in the following way

Binding data: Implementing the transfer

Command: Call to implement operation

Attachbehavior: Implementing actions during control loading

View does not have a lot of code logic. In conjunction with the WPF, Silverlight binding mechanism, MVP evolved MVVM, leveraging the benefits of WPF, Silverlight, and transferring a large amount of code logic and state to ViewModel, which can be said that MVVM was built specifically for WPF and Silverlight.

View is bound to ViewModel and then executes some commands to request an action from it. In turn, ViewModel communicates with the model, telling it to update to respond to the UI. This makes it very easy to build the UI for your app. The easier it is to paste an interface into an application, the easier it is for the designer to use blend to create a nice interface. At the same time, as the UI and functionality become more and more loosely coupled, the testability of functionality becomes stronger.

MVVM: Model-View-view model (Model-view-viewmodel)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.