March 3, 2006
A no-framework MVC approach in PHP
Rasmus Lerdorf, original creator of PHP and now working for Yahoo, does not like complex, feature-blown MVC frameworks fpr creating web applications. He has written a new Tutorial, creating a “no-framework PHP MVC framework” using only PHP5, JSON and the Yahoo! UI Library, suitable for creating the next fancy Web 2.0 site.
Many frameworks may look very appealing at first glance because they seem to reduce web application development to a couple of trivial steps leading to some code generation and often automatic schema detection, but these same shortcuts are likely to be your bottlenecks as well since they achieve this simplicity by sacrifizing flexibility and performance. Nothing is going to build your application for you, no matter what it promises. You are going to have to build it yourself. Instead of starting by fixing the mistakes in some foreign framework and refactoring all the things that don’t apply to your environment spend your time building a lean and reusable pattern that fits your requirements directly. In the end I think you will find that your homegrown small framework has saved you time and aggravation and you end up with a better product.
Rasmus provides a step-by-step tutorial from defining the goals of his project, explaining why and how to do the MVC method and showing the actual code, and also provides an example application.
(found in SitePoint’s PHP blog)