HTML and CSS Reference
In-Depth Information
Instead, sometimes it's actually much more beneficial to roll your own mini
JavaScript library or framework. You're never too much of a novice to learn how
to do this; in fact, it's actually better to get set in your ways now.
A framework is simply a method, standard, or practice for working with your
code. You create a framework to also separate the vital parts of your application
so they're easier to manage as your application grows. The framework also
manages how data flows through your application. You will mainly see
JavaScript objects passed from one method to another for presentation. These
objects will usually represent some form of entity, and are known as models.
The models will usually be passed to a method or a function that will then
display that to the user. In MVC, the method that handles and manipulates the
model for presentation is called the controller, and the code that generates the
HTML incorporating the model is called the view. Figure 8-1 shows how the
MVC framework is structured.
Figure 8-1. MVC diagram for JavaScript
Search WWH ::

Custom Search