nav emailalert searchbtn searchbox tablepage yinyongbenwen piczone journalimg journalInfo journalinfonormal searchdiv searchzone qikanlogo popupnotification paper paperNew
2012, 12, v.28;No.236 57-60
MVVM模式分析与应用
基金项目(Foundation):
邮箱(Email):
DOI:
发布时间: 2012-12-20
出版时间: 2012-12-20
移动端阅读
摘要:

MVVM模式是自2005年微软WPF和Silverlight架构师John Gossman在其博客中首次提出的,它利用了WPF的XMAL和DataBinding,使软件的架构可以分离成为View、Model和ViewModel 3层,使数据和界面得到很好的分离,达到软件设计中的"高内聚,低耦合"的目标。和传统的MVC模式相比,MVVM是其在WPF中的演化和升级。以一个幼儿早教学校的客户管理系统为实例,对MVVM模式进行分析,讨论了它的整体构架,对其各个层次进行了解析,讲述其特点,论述了它的工作原理,并将其与传统的MVC模式进行对比,分析两者的异同,阐述了MVVM模式的优势和不足。

Abstract:

MVVM pattern is first proposed by John Gossman,architect of WPF and Silverlight in Microsoft,in his blog in 2005.It divides the software architecture into three levels,View,Model and ViewModel,with the XAML and DataBinding in WPF.This makes the Data and GUI well separated,and achieves the goal of "highly cohesive and low coupling".MVVM pattern is the evo-lution and upgrade in WPF comparing to the traditional MVC pattern.This paper introduces the MVVM pattern,discusses its archi-tecture,analyses its layers,talks about its features,discourses its working principle via a custom relationship management system in an early education school,compares the differences and similarities to the classic MVC pattern,and describes the advantages and disadvantages of MVVM pattern.

参考文献

[1]Grady Booch.“面向对象分析与设计(原书第2版)”[M]2006.5.

[2]John Gossman Introduction to Model/View/ViewModelpattern for building WPF apps http://blogs.msdn.com/b/johngossman/archive/2005/10/08/478683.aspx 2005.10

[3]Building Enterprise Applications with Windows(R)Presentation Foundation and the Model View ViewModelPattern-New from Microsoft Press.Targeted NewsService(Mar 23,2011),p.n/a.2011

[4]Joshua Kerievsky.[M]“重构与模式”2006.12

基本信息:

中图分类号:TP311.52

引用信息:

[1]刘立.MVVM模式分析与应用[J].微型电脑应用,2012,28(12):57-60.

发布时间:

2012-12-20

出版时间:

2012-12-20

检 索 高级检索

引用

GB/T 7714-2015 格式引文
MLA格式引文
APA格式引文