3 Answers
3

The MVVM is a specialization of the Presentation Model pattern by Martin Fowler. The Presentation Model pattern is platform independent and MVVM was created to take advantage of the capabilities of WPF (and later on Silverlight).

The Presentation Model was published in 2004 and the MVVM was first presented in blog posting in 2005 by John Grossman.

MVP, MVC, MVVM, it's all VERY similar. The difference is mainly in exactly where certain things happen, and exactly what layer the user interacts with:

Thick Client/Smart Client - The View classes are the "god object". The code immediately behind the displayed UI knows everything it needs to in order to do its job, including having knowledge of the domain, possibly the DAL (if not using Active Record), and most rules concerning data validation. Most WinForms apps use this architecture, and even many "vanilla ASP.NET" apps have a very thick layer right up against ASP's HTML generator that handles most of this.

MVC - The Controller is the "god object". It is the object most directly interfaced with by the user, and generates or updates an extremely "dumb" presentation layer (View) based on business logic that gives it knowledge about the Model. The Model may contain higher business logic or it may concern itself only with data integrity. The best example I can think of is in video games; the user sees a video screen with the action happening, but for the most part doesn't work directly with that View to do something. Instead there is an HID in his hands, and when he uses it, signals are sent to logic within the Console which incorporate that data and refresh the screen. Some may argue that any app that uses a mouse or keyboard is MVC by this definition, but I would counter that from the concept of the application's top layer (and not the OS on which it resides), wherever there is a cursor or pointer that is the direct target of input via an HID, that is an abstract representation of the user's own hand that interacts with the UI elements.

MVP - The Controller of MVC is replaced with a less-powerful, more single-purpose Presenter. The Presenter still acts as the intermediary between View and Model, but the View often gains a few responsibilities, such as UI event handling. The Presenter acts to provide the View with necessary data from the Model in an easy-to-absorb fashion; either DTOs or bindable properties. This architecture allows for separation of concerns in GUI apps versus Thick/Smart Client architecture, while still allowing the UI to be the layer with which the user is conceptually interacting, and can be accomplished with most languages/architectures.

MVVM - The Presenter gains back some responsibility from the View and becomes a "binding source" for the View. The View provides only the most basic logic, relying instead on "binding points" available on the ViewModel. All the View knows how to do is get and set information provided by "data bindings", and invoke logic exposed through "event bindings". MVVM as a term was coined by Microsoft to describe the Windows Presentation Foundation, in which the View is structured based on XAML markup files that are given logic through defineable bindings to the ViewModel class.

MVVM is generally accepted to be a derivation of the Presentation Model.

There is a reference to a View model from systems engineering, and I would say they're related, but it's not the same thing. In the systems engineering View Model, it's a model of all the different Viewpoints. The ViewModel in MVVM is more like a model of one viewpoint.

A Presenter does not necessesarily know about the view imho. It depends on where you put the glue code. The view could just observe the presentation model. Martin Fowler makes a distinction between MVP and Presentation Model. MVVM is the latter.
–
FalconOct 14 '11 at 18:36