MVVM (Microsoft's WPF Foundation)-MVC (Common development model/design)-WPF (Microsoft. NET Framework

Source: Internet
Author: User

Recently bullish many people say that iOS MVC obsolete to use MVVM what what, feel very novel, went to search, found that the so-called MVVM is before Microsoft in 10 years about the introduction of WPF, I am not, have been more than two years of C # development, so did a comparison:

First Look at WPF

WPF (Windows Presentation Foundation) is a Microsoft-launched Windows Vista-based user interface framework that is part of the. NET Framework 3.0. It provides a unified programming model, language and framework that truly separates the interface designer from the developer, and it provides a new interactive user graphical interface for multimedia.

Then the application says that MVVM is:

Then look at the classic MVC:

In fact, this is the view layer again divided into the view and view controller layer This reminds me of the previous three-tier architecture and MVC

The three-tier architecture is the most basic project layering result, and MVC is a variant of the three-tier architecture, and MVC is a good development model . First, you need to understand what MVC means, respectively.
M, model layer, is responsible for the interaction of the business logic and the database.
V is the view layer, which is used primarily to display data and submit data
C is the controller, which is used primarily as a capture request and controls request forwarding

Layer three: UI interface layer BLL business logic layer, DAL data access layer, Model entity layer
The M in MVC is not the Model (entity layer) in the three layer, he actually includes the three layers of the Bll,dal,model, which is very important to note, which is the key to the difference between them

It is a bit like this:
Low coupling resistance
Highly reusable and adaptable
Lower life-cycle costs
Rapid deployment
Maintainability
Facilitates the management of software engineering

Of course, the advantages also have shortcomings, that is, the internal structure is complex, not easy to understand, the number of documents, management difficulty naturally also big

In fact, there is no difference, or it is interrelated specifically

The different levels of disruption and then split the new level, this is the difference, the amount, the feeling is now the pattern is so, may be easy for the old programmer, the original use of the handy, but for beginners, these gratitude is a nightmare, MVC is a kind of the existence of a balm, you say he is a design model or framework, Anyway, I think it's good to do it, and that's what MVVM is for.

The model layer is indispensable, we have to have something to act as a DTO (data transfer object), of course, with a dictionary is also possible, programming, to be flexible. The model layer is a relatively thin layer, if you learn Java's small partners, JavaBean should not be unfamiliar with it.

The ViewModel layer, the binder for the view and model layers, is an excellent place to put user input validation logic, view display logic, initiating network requests, and a variety of other code. To put it bluntly, the original Viewcontroller layer of business logic and page logic and so stripped out to the ViewModel layer.

The view layer is the Viewcontroller layer, and his task is to get the data from the ViewModel layer and display it.

Finally, I'm going to put a couple of frames I've been looking for from the Internet. Design of the MVVM framework I'm currently working on the specifics of MVC or MVVM, benevolent see,



MVVM (Microsoft's WPF Foundation)-MVC (Common development model/design)-WPF (Microsoft. NET Framework

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.