jargon

Comparison

Model-view-presentervsModel-view-viewmodel

Model-view-presenter

the view is an interface with setTitle and showError on it, and the presenter is what you actually unit test.

A variant of MVC where the view is passive and holds no logic, and a presenter reads from the model and pushes formatted values into it through an interface. The point is testability: the presenter can be tested against a fake view with no UI framework at all. It costs a method on the view interface for every field on the screen, which is why it faded once binding-based approaches arrived.

Full entry →

Model-view-viewmodel

you changed a property on the viewmodel and the label updated, and no code you wrote connected the two.

A presentation model plus declarative data binding: the view binds to properties and commands on a viewmodel, and the framework propagates changes both ways. It removes the per-field wiring that MVP requires and moves the cost into a binding layer whose failures are silent — a misspelled binding path that simply shows nothing. It requires framework support to exist at all, which is the practical difference from presentation model.

Full entry →

Related comparisons