Chad Minick
Software Developer

PHP frameworks are obsolete

July 18, 2012 Comments, , , ,

As a person who works with the PHP support community quite a bit, I'm often asked "What PHP framework do you recommend?". I answer this as honestly as I can: "None of them". It does pain me to say this, but as someone who's been to the other side, and not only seeing that the grass is greener, it's like REALLY FREAKING GREEN. Now before I start getting hate mail, let me explain that I still think there is a market for PHP frameworks.  I think if you have a moderately low traffic site that's going to live on shared hosting, and is basically a CRUD application on top of MySQL, disregard this article, it probably isn't for you. However, I've seen so many projects start out with that scope. They either grow or the developer/client wants to add more fancy new features they are starting to see elsewhere on the web. Then I see all these PHP developers hacking things that the PHP stack really isn't meant to do. Of course there are add-on systems you can put on your stack to tackle these problems but they don't have full control over the systems and people seem to be reluctant to add a new system if they could JUST hack this ONE thing into their web app (that will summarily destroy their throughput of their web server). I will go over these add-on systems in a bit.

The other thing that bothers me is that PHP frameworks are stuck in a rut. They seem to be pushing the same marketing that they've been pushing for years arguing over who has the most "lightweight" framework and claiming to be "fast" and other completely useless metrics like who can do web MVC the best. I feel "lightweight" is a completely useless metric, "Fast" is completely subjective especially since these days the greatest optimizations are done on the client and developers still don't know how to do JOIN SQL queries or how to index their databases correctly... When comparing those things to the speed of how fast a controller can be called, speed of the framework is just not that important or impressive. As for who can do MVC the best, that topic is tired and old.  I think it's a solved problem now. How about exploring different architectural patterns? Really what I'd like to see (besides the features I am going to mention after this paragraph) is to see frameworks start to advertise, for example, how loosely coupled they are.

So what makes a good framework then? Let me list all the things that are being used to make a well put together modern professional web application, and summarily the add-ons to the PHP stack that are needed to tackle each. Note: not all of these are required but they will sneak in the more the project grows.

That's a lot of systems that a good web developer needs to be familiar with. What's even worse is it's a lot of systems that need to be maintained and juggled all at once. That's quite the infastructure there. Very expensive for training, maintaining and using. Too bad web frameworks aren't trying to trim that list down.. oh wait, they have already started!
Ladies and Gentlemen I give you the Java/Scala based Play Framework. Lets take a look at that list again...

So there you have it, why I see PHP frameworks as obsolete. Finally people ask me, "If play has all this, isn't it really heavy?" No.  It's surprisingly small. It builds off the shoulders of giants and integrates mature industry-tested libraries to achieve all this in one small integrated package. So if you have time to play with a new language and framework I suggest you look around. My only gripe with Play right now is that it is not really that mature yet, but it's getting there. This kind of framework is the road modern web frameworks need to travel.

comments powered by Disqus
Chad Minick | Software Developer
Twitter | Github | LinkedIn