PHP in Action

Immediacy and frameworks

dagfinn | 06 April, 2008 07:21

As if to remind us that not everyone in Ruby hates PHP and vice versa, Rails creator David Heinemeier Hansson commends the immediacy of PHP.

I'm vaguely wondering if he's also understood the potential of the smooth, agile ride from the immediate to the complex. Probably not.

To quote myself from the Sitepoint PHP Application Design forum, to the question When do you think it is time to develop a custom framework?, I answered:
Never. Always. Start dirt simple and refactor to eliminate duplication. When you need a specific feature, study how it's done in existing frameworks and implement it. That will get you a "framework" that has exactly what you need.

This is an approach that is facilitated by the immediacy of PHP. Is this approach slower, long-term, than adopting a framework? That probably depends on a lot of variables. If an existing framework does everything your application
needs, it may be a great idea to use it. On the other hand, if you need to do things that are significantly different from what the framework supports, you need to start mucking about with the framework itself. In that case, it may be more
effective to have you own "framework" that fits the application like a glove, without a lot of features you will never need, and without features that are almost, but not quite what you need.

I love Ruby, but I've never actually tried Rails. Reading Rails tutorials, I'm not quite as impressed as some folks I know.  Rails certainly represents the state of the art in web programming. So do the leading PHP frameworks, some of which are heavily inspired by Rails.  The difference is not that striking. But I don't want the state of the art, I want the web framework of the future. And can that be built on the existing frameworks, or do we need to start from scratch? There are some interesting possible beginnings out there, such as Phaux.

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
    blogmarks del.icio.us digg NewsVine Reddit
 
Accessible and Valid XHTML 1.0 Strict and CSS
Powered by LifeType - Design by BalearWeb