Rich Buggy

...Developer, CTO, Entrepreneur

Top 6 framework gripes

Written by Rich on February 17th, 2007

I just read a post by Andrei Zmievski pleading for people to stop releasing their own frameworks. As someone who has my own (unreleased) framework I wanted to answer why don’t I use an existing framework. It’s simple really, typically they’re slow, bloated and love to provide wrappers for PHP functions.

Here are my top 6 framework gripes:

  1. Using their own database abstraction layer.
  2. Using the Active Record design pattern in production applications.
  3. Using a template engine instead of PHP.
  4. Using XML to store configuration information.
  5. Adding code until the framework can be used in every imaginable situation.
  6. Including classes that provide rarely used functionality in the core framework.

5 Comments so far ↓

  1. oDn says:

    Hi there,

    I get most of your points.
    However, I can’t get around working out the problem with “Using XML to store configuration information.”? What can possibly be wrong with that?

  2. Rich says:

    @oDn: XML is extremely flexible but s-l-o-w. Using a PHP config file is significantly faster and opcode caches, like APC, will cache it for even greater speed. On a shared host you might not care but if you’re a dotcom then this can save you $$’s by reducing the number of servers required.

  3. Anom says:

    @Rich
    What you don’t seem to say is that representing complicated structures in ini files is an impossible task, while with XML is a breeze. It’s all a matter of the circumstances by which you’re limited to build your app with, not the tool that you use.

    .02

  4. Matt says:

    Why not active record in production? There are caching solutions you know?

  5. Rich says:

    @Anom: You’re right about complex configuration being easy in XML and almost impossible with an INI file. But I’m talking about using a .php file to store the config which is as flexible as XML but faster.

    @Matt: Adding caching is treating the symptoms while ignoring the problem. In development active record rocks!! There needs to be an easy way to freeze the models between development and production. If the model is still changing then its not really a production environment.

You must be logged in to post a comment.