
Originally Posted by
Pullo
Hi there,
I presume you are referring to Sitepoint's "PHP & MYSQL From Novice to Ninja (5th Edition)"
As far as I understand it, the reason for this approach is to separate your app's logic from the presentation of the data.
This pattern helps ensure separation of concerns of your code and in most cases will steer you clear of 'spaghetti php' where your app's logic is tangled with the HTML generation.
The modularity of this approach also means that you can easily reuse various pieces of your code on both your current and future projects.
I'm not sure of the name of this pattern, but, as it's implemented in the book it's not MVC (or at least, if it is, it is missing the model (M) part).
Maybe someone else has an idea?
Not in any way which will be noticeable. If your site is starting to slow down under high traffic, this is one of the last things you'll need to worry about.
Bookmarks