[WPF series] basic learning-WPF design patterns overview, wpf-wpf

Source: Internet
Author: User

[WPF series] basic learning-WPF design patterns overview, wpf-wpf
Introduction

The "Design Pattern" is something cool for programmers to pick up, And it truly makes programer of the beginner Design Pattern intoxicated. Too many experiences tell us that "everything must be done in an appropriate way and we must learn to stop it. The same is true for the "design mode". It is not intended for the "Mode" (except for the beginner demo ), then the original intention of the design model proposed by GOF and other elders is lost (the basis for reusable object-oriented software ).

Layer-3 architecture in common applications

 

MVC> MVP> MVVM

 

The following figure shows the design mode of the presentation layer:

 

 

More details refer to http://www.codeproject.com/Articles/66585/Comparison-of-Architecture-presentation-patterns-M

 

MVVM mode relationship

 

   

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 ViewModel tells the Model to update to respond to the UI.

In this way, the UI design for the application is relatively independent, and it is very easy to replace the uidesign ("whatever you want" to design your interface ). At the same time, when the UI and functions become increasingly loosely coupled, the functional testability is getting stronger and stronger.

 

Common open-source MVVM frameworks

 

Based on the structure separated by the front-end XAML of WPF and the back-end code, MVVM is the best design mode favored by WPF applications. There are also many MVVM mode frameworks:

Microsofts MVVM Toolkit No updates now. If you are interested, please refer to the source code.

MVVM Foundation

No updates now
MVVM initial implementation

MVVM Light Toolkit

Looking at the name, we can see that it is a lightweight MVVM framework, and now there are many applications on mobile clients.
Https://github.com/Caliburn-Micro
Https://caliburn.codeplex.com/
The framework is relatively large, but there is also a lite version, and the main tool is the lite version.

Patterns & practices: Prism

Microsoft's open source code is continuously updated,
The advantage of Microsoft is inherent.
More details reference: http://www.cnblogs.com/KnightsWarrior/archive/2010/11/01/1866641.html

 

Further research will be conducted on how to choose these frameworks.

Currently, the author only chooses Prism for development, and other frameworks will be gradually used.

 

 

References

What is a three-tier architecture?

Http://www.codeproject.com/Articles/66585/Comparison-of-Architecture-presentation-patterns-M

Http://www.cnblogs.com/KnightsWarrior/archive/2010/11/01/1866641.html


The younger brother recently wanted to learn WPF and had a certain C # Foundation. He recommended a textbook, deep dive into wpf, and did not know how,

<Wpf advanced programming> if you have C # basics, I think it is quite suitable for you. I just bought one.

What is the basis for learning WPF technology? How to get started?

This ...... What else do you worry about when there are so many slave servers? Action is taken.
From the perspective of non-professionals:
For strong people like you, wpf seems to be nothing more than the XAML language, but it is essentially Xml.
As for the separation of the interface and code --ASP.net, isn't that true?
The rest is to select a textbook. I personally have read two books: WPF secrets (thin points, it seems easier to grasp the global) and WPF programming book (thick points, it seems easier to understand ).

Related Article

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.