O'Reilly logo

Learn HTML5 and JavaScript for Android by Gavin Williams

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

Chapter    8

JavaScript: Models, Views, and Controllers

There are many development design patterns. One that has really stood out and can be applied across almost all programming languages is MVC (Model View Controller). MVC breaks down how an application should be structured into various layers of responsibility.

It’s all too common that we, as developers, jump in and begin working on a project with no real understanding of how that project will eventually evolve or grow. For example, we pull in data from external resources using Ajax and then simply render that data in HTML in the same code block. What happens when you then want to use that same HTML in another part of your application, but for a different purpose, using a different data ...

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