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 ...
Get Learn HTML5 and JavaScript for Android 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.