Chapter 10. JavaScript MV* Patterns

In this section, we’re going to review three very important architectural patterns: MVC (Model-View-Controller), MVP (Model-View-Presenter), and MVVM (Model-View-ViewModel). In the past, these patterns have been heavily used for structuring desktop and server-side applications, but it’s only been in recent years that they have been applied to JavaScript.

As the majority of JavaScript developers currently using these patterns opt to use libraries such as Backbone.js for implementing an MVC/MV*-like structure, we will compare how modern solutions differ in their interpretation of MVC compared to classical takes on these patterns.

Let us first cover the basics.

Get Learning JavaScript Design Patterns 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.