MVC / MVP / MVVM What the Heck?

不羁岁月 提交于 2019-11-29 19:32:23

Microsoft's Application Architecture Guide describes MVC and MVP, and explores the differences between the two.

http://www.codeplex.com/AppArch

This MSDN article describes MVVM and it's evolution.

http://msdn.microsoft.com/en-us/magazine/dd419663.aspx

It can be hard to grok the differences between patterns by looking at a particular pattern implemented in a particular framework. This msdn article WPF MVVM makes reference to Martin Fowlers original articles which explain a pattern as a general approach:

Back in 2004, Martin Fowler published an article about a pattern named Presentation Model (PM) [...] consider MVVM to be a specialization of the more general PM pattern, tailor-made for the WPF and Silverlight platforms.

So to understand different patterns it is useful to look at Martin Fowler's descriptions of different approaches. His Passive View pattern is the MVP approach. His Supervising Controller pattern is the MVC approach. His Presentation Model pattern is the MVVM approach. This older article takes about the evolution of such patterns.

It may also help to look at implementations in different languages. The article Implementing event-driven GUI patterns using the ZK Java AJAX framework contrasts the three of Martin Fowler patterns mentioned above in a modern Java framework. Even though its a different language and a different framework from WPF it may help to see the pattern rather than the implementation of the pattern to see it done in a different language.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!