Introduction to mvvm Mode

Source: Internet
Author: User

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



Component Model, view, and viewmodel

View: Ui

Viewmodel: it is the abstract of the view. It is responsible for converting the information between the view and the model and transmitting the view command to the model;

Model: data access layer

The following method can be used to connect view and viewmodule:

Binding data: Data Transmission

Command: Call the operation.

Attachbehavior: Implements operations during control loading.

Not many viewsCodeLogic. Combined with the WPF and Silverlight binding mechanisms, MVP evolved into mvvm, making full use of the advantages of WPF and Silverlight to switch a large amount of code logic and status to viewmodel, mvvm is specially designed for WPF and Silverlight.

The view is bound to the viewmodel, and some commands are executed to request an action from it. In turn, viewmodel communicates with the model and tells it to update to respond to the UI. This makes it easy to build the UI for the application. To an applicationProgramThe easier it is to paste an interface, the easier it is for the designer to use blend to create a beautiful interface. At the same time, when the UI and functions become increasingly loosely coupled, the functional testability is getting stronger and stronger.

Introduction and examples on msdn

Http://msdn.microsoft.com/en-ca/magazine/dd419663.aspx

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.