There have been a lot of new PHP frameworks coming into existence. With the release of PHP 5.3, many frameworks are taking the leap with a total do-over of their codebase to take advantage of 5.3’s namespacing and other advancements. But most seem to be missing the mark.
PHP 5.3-specific frameworks :
- Recess has a 5.3 branch in development
- Sensio is working toward Symphony 2.0 (in dev)
- Some CakePHP core devs have gone AWOL to start Lithium (0.2 released yesterday)
These last two are both total do-overs. Lithium seems very promising. It comes with very good support for schemaless key-value stores like MongoDB which to me is a huge win. Also they use the same view template extension convention as Recess (index.html.php) which is nice. But still I can’t tell you what a pain in the ass it is to open a layout and find code like this :
<html>
<head>
<title><?=$title; ?></title>
<?php echo $this->html->charset(); ?>
<?php echo $this->html->style('base'); ?>
<?php echo $this->scripts(); ?>
<?php echo $this->html->link('Icon', null, array('type' => 'icon')); ?>
</head>
// ...
Do you really need to abstract away the stylesheet tags?
Is it that hard to type in a meta tag for the charset?
Why make me hunt through the code to find this stuff?
I think there’s a problem with the way people are writing frameworks these days.
I think people are afraid of HTML.
And it’s sad.
Because that’s what websites are.
We should be embracing our HTML, not hiding it.
We may like to think that we’re Ajaxy, but the goal of development should not be to write less HTML.
The goal of development should be to quickly produce code that works well and is easy to understand and maintain.
Fancy framework shenanigans be damned.