Jacob Santos writes "it would have been a mockery to PHP developers, if I had taken up writing about MVC, which I still barely know anything about". However, he has been working with Page Controller Pattern of MVC so Jacob decided he could write what little he does know and let someone with more knowledge fill in the blanks.
Types of Page Controllers
"From my experience, it seems Page Controlling falls into three categories, based on difficultly of implementation", Jacob writes. They are:
- IF Block Structure: the method has flaws, for one, if there are many pages that need to be controlled, then the if block can get fairly large and hard to manage; and two, once it does get large, say around 1000 to 100000 blocks, it can be slow.
- Directory Structure: the advantage of this method is that you wouldn't have to touch the page controller to add new pages to the list. "It also has less chance that I'll forget a bracket and the whole PHP site would fail. Removing a single point of site failure is a problem that I needed to address with future development", Jacob writes.
- Object Method: "many frameworks and classes exist for handling the Page Controller using an object. I have not yet developed with this method, so I know nothing about how it works. I do hope to learn after working with the second method for a while", he writes.





