For example: The example MVC system loads the specific Model, View, and Controller set for the requested page.
If the URL parameter is “about”, then the About page will be displayed.
For example: The action URL variable tells the system which function in the Controller to execute.
It is important to remember that when this function passes data to the Model, it passes a piece of data to the Model that will in turn indicate which View and View Action to load.
I also recommend a quick visit to Tom Butler’s site as he has an article which looks at implementing the Front Controller into his “1.1 Controller: View” relationship, ideal for those looking to develop a true dynamic routing solution into their MVC system.
Remember to never allow the Controller to load or directly pass data to the View; it must only interact with the Model and the User’s inputs.Nevertheless, if dynamic routing is implemented correctly and effectively, is can make the Controller more desirable within the system compared to using static routing.Adding a Front Controller will allow your system to dynamically load sections, depending on what you want it to load.Therefore it only makes sense for your View component to select a template and pass the data from the View into that template.That way it is ready to be displayed using a block code layout, or with an echo, print, or any other outputting code in PHP.