PHP in Action Rotating Header Image

Immediacy and frameworks

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.

Share/Save/Bookmark

Leave a Reply