JavaScript Model, Controller, and Control Objects

Having now seen the changes required to make the PHP function example object-oriented, you can more easily understand these same changes in JavaScript. As discussed in Chapter 2, the Front Controller in JavaScript is the enclosing web page itself. In the procedural example that follows, the same as in Chapter 2, the button and the hidden inline frame make the same calls that were made in the PHP Front Controller. In the object-oriented version, this behavior is still retained since these are part of the Front Controller in a web page.

Image

The differences in these two examples reside in the creation ...

Get Oracle Database Ajax & PHP Web Application Development 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.