Silverlight + Model-View-ViewModel (MVVM)
2009-03-01 11:51
381 查看
早在2005年,John Gossman写了一篇关于Model-View-ViewModel模式的博文,这种模式被他所在的微软的项目组用来创建Expression Blend(即'Sparkle')。它跟Martin Fowler的Presentation Model非常相似,唯一不同的是,它填平了presentation model和使用了WPF的丰富的数据绑定的view之间的沟壑。在Dan Crevier发表了神作DataModel-View-ViewModel series博文系列之后,(D)MVVM模式开始变得流行起来。
(Data)Model-View-ViewModel模式跟经典的Model-View-Presenter模式很相似,除了你需要一个为View量身定制的model,这个model就是ViewModel。ViewModel包含所有由UI特定的接口和属性,它们是轻松构建UI的必要元素。View绑定到ViewModel,然后执行一些命令在向它请求一个动作。而反过来,ViewModel跟Model通讯,告诉它更新来响应UI。
这使得为应用构建UI非常的容易。往一个应用程序上贴一个界面越容易,外观设计师就越容易使用Blend来创建一个漂亮的界面。同时,当UI和功能越来越松耦合的时候,功能的可测试性就越来越强。
Hands-On Model-View-ViewModel (MVVM) for Silverlight and WPF :
http://weblogs.asp.net/craigshoemaker/archive/2009/02/26/hands-on-model-view-viewmodel-mvvm-for-silverlight-and-wpf.aspx
MVVM pattern in Silverlight using SLEextensions
http://blog.developers.ba/post/2009/02/15/MVVM-pattern-in-Silverlight-using-SLEextensions.aspx
[WPF] Another sample of WPF application using the pattern MVVM
http://weblogs.asp.net/thomaslebrun/archive/2009/03/17/wpf-another-sample-of-wpf-application-using-the-pattern-mvvm.aspx
浅谈MVP与Model-View-ViewModel(MVVM)设计模式
http://mvvmref.codeplex.com/
(Data)Model-View-ViewModel模式跟经典的Model-View-Presenter模式很相似,除了你需要一个为View量身定制的model,这个model就是ViewModel。ViewModel包含所有由UI特定的接口和属性,它们是轻松构建UI的必要元素。View绑定到ViewModel,然后执行一些命令在向它请求一个动作。而反过来,ViewModel跟Model通讯,告诉它更新来响应UI。
这使得为应用构建UI非常的容易。往一个应用程序上贴一个界面越容易,外观设计师就越容易使用Blend来创建一个漂亮的界面。同时,当UI和功能越来越松耦合的时候,功能的可测试性就越来越强。
Hands-On Model-View-ViewModel (MVVM) for Silverlight and WPF :
http://weblogs.asp.net/craigshoemaker/archive/2009/02/26/hands-on-model-view-viewmodel-mvvm-for-silverlight-and-wpf.aspx
MVVM pattern in Silverlight using SLEextensions
http://blog.developers.ba/post/2009/02/15/MVVM-pattern-in-Silverlight-using-SLEextensions.aspx
[WPF] Another sample of WPF application using the pattern MVVM
http://weblogs.asp.net/thomaslebrun/archive/2009/03/17/wpf-another-sample-of-wpf-application-using-the-pattern-mvvm.aspx
浅谈MVP与Model-View-ViewModel(MVVM)设计模式
http://mvvmref.codeplex.com/
相关文章推荐
- [Silverlight入门系列]使用MVVM模式(2):集合Model /ObservableCollection/ICollectionView
- [Silverlight入门系列]使用MVVM模式(9): 想在ViewModel中控制Storyboard动画?
- [Silverlight入门系列]使用MVVM模式(9): 想在ViewModel中控制Storyboard动画?
- Silverlight之MVVM:模型-视图-视图模型(Model-View-ViewModel)(16)
- 转:[Silverlight入门系列]使用MVVM模式(9): 想在ViewModel中控制TreeView节点展开?
- Pro WPF and Silverlight MVVM 第4章ViewModel 读书笔记
- Silverlight + Model-View-ViewModel (MVVM)
- Silverlight + Model-View-ViewModel (MVVM)
- Silverlight + Model-View-ViewModel (MVVM)
- [Silverlight入门系列]使用MVVM模式(7):ViewModel的INotifyPropertyChanged接口实现
- silverlight mvvm viewmodel 关闭 view窗口
- [Silverlight入门系列]使用MVVM模式(8):ViewModel进一步分离出Services
- 电子书下载:Pro WPF and Silverlight MVVM: Effective Application Development with Model-View-ViewModel
- WPF MVVM设计模式的ViewModelBase和CommandBase代码
- MVVM模式中ViewModel和View、Model有什么区别
- MVVM模式中ViewModel和View、Model有什么区别?
- WPF MVVM中在ViewModel中关闭或者打开Window
- 【学习笔记】Silverlight框架:Jounce(7)——ViewRouter和ViewModelRouter
- MVVM模式之:ViewModel Factory与注入
- MVVM模式的View与ViewModel的三大通讯方式:Binding Data(实现数据的传递)、Command(实现操作的调用)和Attached Behavior【转】