August 2016
Intermediate to advanced
286 pages
5h 31m
English
As things are now, the logic in our page scripts is highly repetitive. They all look very similar. Each one loads a setup script, instantiates a series of dependencies for a page controller, invokes that controller, and sends the response.
Our front controller gives us a place where we can execute the common elements of each page script and remove that repetition. Once the repetition has been removed, we can begin to eliminate the page scripts themselves.
In essence, each of our page scripts follows this organizational flow:
Generic Page Script 1 <?php 2 // one or more identical setup scripts 3 require 'setup.php'; 4 5 // a series of dependencies to build a controller 6 $request = new ...Read now
Unlock full access