Another (PHP) Framework

Last month I read Adam’s call OSCON papers. I mention this today because I have to submit something this weekend, but I remember reading something funny.

As usual, they’re desperate for PHP papers. In fact, the only thing they won’t take is a paper about your database abstraction layer or “Yet-Another-CMS“. I find this amusing and true. There are way too many PHP Frameworks out there. Sure PHP-Nuke/PostNuke/XOOPS are great for making a website if you don’t know PHP or have design sense, but knowing any PHP is worse than useless—the more PHP you know, the more offensive they become.


The problem is they do only one thing well. Color outside the lines and you run into the mess of a framework.

Approaching from the other side has actually turned more disastrous. The reason is a framework tries to do too much well and ends up doing nothing at all, other than keep a lot of Java consultants employed *cough* J2EE *cough*. There are many more of these for PHP than nearly anything else, and I won’t embarrass anyone by singling a few out.

The only truly successful framework for PHP is PEAR. And it’s only successful because it’s framework consists of only two classes: PEAR and PEAR_Error.

It’s probably because framework code is the antithesis of the design principles that went behind PHP. Frameworks try to do too much; PHP tries to pass the buck. Frameworks are complete; PHP is a component (the ‘P’ in LAMP). Frameworks are standard; almost nothing in PHP is standard, that’s why you need a website to document its quirks. Frameworks surround; PHP sits inside. Frameworks are complicated; PHP is simple.

You have to seriously be out of touch with PHP to try to make a framework in it.

It’s been a while since I’ve done serious PHP programming. I had better change that, lest I run out of things to talk about at OSCON.

Guess it’s high time I wrote a PHP Framework…

7 Responses to “Another (PHP) Framework”

  1. The Woodwork » Blog Archive » object serialization without pity Says:

    [...] Kleine writes a PHP 5 framework called Stubbles. I have a long-standing view about frameworks that hasn’t changed one bit. But instead of arguing about the Sysaphean task Frank is engaging [...]

  2. @TheKeyboard :: In Spring Time, A Not-so-young PHP Programmer’s Mind Turns To Frameworks Says:

    [...] who has only a little bit of UI experience create something more interesting. Maybe Terry Chay was right about frameworks. His claim is that frameworks are really good for helping you generate fairly [...]

  3. The Woodwork » Blog Archive » Simple prescriptions and making choices Says:

    [...] code is about making choices. Using any framework? Some choices have been made for you. When you pick up one end of a framework, you pick up the [...]

  4. The Woodwork » Blog Archive » I just like hearing my name Says:

    [...] You mean the one app people are creating twenty times? [Ahh, Frameworks, my old [...]

  5. The Woodwork » Blog Archive » Adobe’s AIR MAX Says:

    [...] by espousing frameworks. For Karen it’s Django, and for Ed it’s CodeIgniter. (Ahh, Frameworks, my old nemesis, we meet [...]

  6. The Woodwork » Blog Archive » April Phails Says:

    [...] Hmm, makes me jealous. I should be writing my own framework. I heard all the cool kids are doing it. [...]

  7. dblackshell Says:

    I’ve done my own framework (haven’t released it publicly or something like that) to improve my coding skills… but I use CodeIgniter for projects I have :) . Why PHP frameworks, because they make life easier for lazy coders like myself. :)

Leave a Reply