Creating the Pattern

Usually when you read about the MVC pattern, it is not related to JavaScript. However, as I am sure you have noticed, we have already begun to implement this pattern with the components we have built. Each of the components consists of at least one controller and one view object, whereas the model consists of the objects that interact with the server, such as the Ajax, AjaxUpdater, and HTTP objects that we created in Part II, “Creating and Using the JavaScript Engine.” Creating this pattern is as simple as starting with the folder structure in the code folder of our application. Since this pattern is related to the JavaScript code we are creating, we will create this structure within the javascript directory as in Figure ...

Get Ajax for Web Application Developers 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.