O'Reilly logo

Pro JavaScript for Web Apps by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

C H A P T E R  3

Adding a View Model

If you have done any serious desktop or server-side development, you will have encountered either the Model-View-Controller (MVC) design pattern or its derivative Model-View-View-Model (MVVM). I am not going to describe either pattern in any detail, other than to say that the core concept in both is separating the data, operations, and presentation of an application into separate components.

There is a lot of benefit in applying the same basic principles to a web application. I am not going to get bogged down in the design patterns and terminology. Instead, I am going to focus on demonstrating the process for structuring a web app and explaining the benefits that are gained from doing so.

Resetting the Example ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required