MVP and MVVM

The term Model-View-Whatever came about amid the rise of many architectural patterns that included a Model and a View, but replaced the Controller with a different concept for a core component, or even with a number of them.

MVP

MVP is a variation on the MVC architectural pattern in which the Presenter component replaces the Controller. The Presenter also acts as the Controller in this pattern, but it takes on additional responsibility in that it serves to handle presentation logic for the View. The reasoning behind this paradigm is to enhance the testability of an application by having the View itself contain little to no presentation logic.

Another key difference between MVP and MVC is that a Presenter in MVP has a one-to-one relationship ...

Get Mastering JavaScript Single Page Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.