The Main Module and Controllers

In traditional PHP, ASP, JSP, Ruby, or other web applications, direct calls are made to many different full pages. Each page is an entity unto itself. It behaves in a distinct and independent fashion. The main procedural module found in the preceding section doesn’t behave like this at all since it is a Front Controller.

A Front Controller is the door through which all interaction with the application occurs. Each request sent to the application arrives there with the information required to process the request. Since AJAX is a very request-driven approach, a Front Controller is ideal for the back end. If it is written well, its slimness is surprising, as in the example in the preceding section. It requires almost ...

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.