Written September 27, 2007 in php, punditry, symfony, webdev

Is there a framework that is uncomplicated, easy to get started in, will let you build applications out quickly with a minimum of hassle, and will let you integrate non-standard behaviours and ‘best practices’ that you feel are important?

Frameworks are great because other programmers can walk into the project and see exactly what the status of things is and how it should all work… and then start contributing almost immediately.

Frameworks can be bad when it takes a degree in computer science to figure out how to manipulate the thing into doing what you want because the behaviour you’re looking for was extended five layers back from some obscure object in a subdirrectory. PHP doesn’t have the IDE tools to handle that like Java and .Net do.

  • Symfony - Learning curve like a backwards ski jump. Crippled by poor integration with two bad MVC systems — Propel’s crufty and backasswards and needs to drop down to Creole for m2m relationships… and don’t get me started on Criterions. Doctrine’s just incomplete and the integration isn’t going as well as planned because of the extensive refactoring. Requires too much code generation. Takes mucking around in configuration files for a month before you lay down any PHP code.
  • Zend Framework - One step better, but it’s so disjointed until you get to the Zend_Controller interface. You essentially need to extend the core libraries and load your versions instead of the core. Each piece is nice by itself, but I wouldn’t call the current release 1.0 because it’s still disjointed. On top of that, you can’t do multi-layer templates without integrating a separate template system like Smarty or re-writing the View sytem. There’s proposals in the works for it, but come on — this is a basic templating feature, and you took us back to the bad old days of “require header.php; echo $content; require footer.php;”? I’d expect something a little more modern out of Zend.
  • Cake - Still supports PHP4, so it’s OO is backwards.
  • CodeIgniter - See Cake.

I want a framework that handles the configuration for me — it sets up a file structure with basic naming conventions, it provides decent templating functionality, it looks in the databases to find a model (and doesn’t have stupid one-database-per-app requirements) and inherits from that, and it provides configuration functionality that makes sense instead of endless arcane ini, yml and xml files.

Symfony almost gets it right, but it’s too complex and setting up a model and generating the code is a pain in the arse. Zend almost gets it right, but you still spend a week extending functionality and configuring things before you can build your application.

I just want to get in and start coding, and have the framework handle the rest for me instead of configuring, coddling, debugging and tweaking the framework… and then someday getting around to coding.

And while I’m dreaming, I’d like a pony.

3 comments on ' Mood: Jaded '

  1. Symfony indeed has a steep learning curve.

    You can actually work around the propel issues. Propel is a pain for any join query you want to write, but once you get the hang of its not too bad.
    There is some good stuff in the Symfony forums.

    Heard that the 1.3 release is a lot better (probably will be included in Symfony 1.1, currently a plugin is available for those desperate to switch)

  2. I agree that symfony has quite a learning curve, but that’s the price for such a rich featureset. I’d wager that most beginners with symfony are coming straight from using a language (eg PHP) with no framework (as I did). On this basis it’s rather like learning a new language - it’s frustrating - especially to have to follow someone else’s way of thinking - but it is worth it in the end.

    I’m not sure if the “one db per app” applies to symfony; AFAIK you can put several connections in your databases.yml and switch between them at will. In any case it sounds like the data layer is your primary complaint: you can always just use PDO or other more “low-level” engine, and write the SQL yourself. Some developers do prefer that, and if works for them, great.

    All that said, it may be that for your requirements, a “roll your own” approach might suit you better. No single framework is suitable for everyone.

      Written by halfer on September 29, 2007 at 8:29am

  3. Thanks for this post.

    I am (trying to) learn Symfony, but I also feel it quite complex to understand all these yml config. And yes, you generate a lot of code, so what happens when you need to refactor??

    So is it true then, that PHP doesn’t have one single good framework? Are we condemned to use ASP.NET if we want to quickly build running applications?

    Disappointing, but maybe true…

Leave a comment

name (req'd)

email (req'd)

website