The Model-View-Presenter pattern
The Model-View-Controller pattern gives us a better architecture for presenting data to the user. It assigns a specific task to each component so that possible changes might only concern one component letting the others unchanged. However, the three components of the MVC pattern remain someway interconnected: the View knows its Controller and the Model, and the Controller depends on the View and the Model. For example, a change to the Model may require changes to both the View and the Controller.
The Model-View-Presenter pattern or MVP proposes a layered architecture with fewer dependencies. In this pattern, the View intercepts the user interactions and asks the Presenter for changes to the Model. This means that ...
Get Mastering JavaScript Object-Oriented Programming 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.