Are PHP Frameworks All Hype?

The short answer is, yes.

Let’s explore why that is.

Who in their right mind would try to sell their framework idea by saying, “It’s slower than straight php”, or “it lacks form customization”? I’m pretty sure no one would. This article is based solely on my own personal experience of dealing with web development for over 13 years.

I want to start out by saying that I’ve tried many PHP frameworks. I’ve tried Cake, Magento (a CMS loosely based on Zend philosophy), Symfony2, Zend2, Yii, Codeigniter, Light VC, Laravel, and many other in my own personal time). One thing to note is the amount of frameworks that exist out there just for PHP alone. Why so many? If any one of them were as good as PHP itself, why hasn’t it become the standard? The reason may shock you… or not. PHP frameworks suck! Even Rasmus Leerdorf himself (the creator of PHP) had said it.

Web development and web application development is not the same as any other type of programming. It’s development that creates short lived web pages (applications) and rapid AJAX calls in order to provide the end user with some sort of interaction and/or data management. These little pages, together create the illusion of being “logged in” an application. Applications keep massive amounts of data alive until that application is shut off. Think of the OS that you’re on right now. TONS of things happening in RAM while you’re listening to your favorite music and reading this post. On this particular website, the page has already loaded. Nothing much else is happening. The web app finished rendering a long time ago and is now in a sort of an “off” state. I just want to make sure we understand the differences between web app development and any other type of application development where the data stays alive for the entire duration of the application.

Yes, there are exceptions, such as sockets, but for the most part, most websites render out, and boom, done! The server on the other hand may keep a session alive. If not, your authentication is probably handled by cookies, or RESTful api keys and secrets. Anyway.

Trying to introduce a concept of MVC, previously only used in single language environments (i.e. Java), to a multi language environment (Apache, PHP, MySQL, HTML, CSS, JS, etc) is plain ridiculous. I understand the idea behind separating code, but for a website, it’s ludicrous to think that you can do all of data collection through PHP, or all of the JS calls from PHP, or even CSS rendering from PHP. Websites are a special type of applications that can, and should handle multiple types of languages in order to provide the best experience for end users, visually, and functionally. Imagine if we could only code websites in PHP alone. What a mess that would be.

The simple truth, and this may hurt anyone out there, is that with all of these different frameworks, not one has stood the test of time over a two year period. Everytime PHP gets updated, your frameworks becomes useless. All the bells and whistles just became obsolete. And forget about v2.0 of the framework since nothing is backwards compatible. It’s a complete nightmare.

I always hear the argument about how noobs pick up a framework faster. Faster than what? PHP? Don’t they have to learn PHP first? And if they know PHP, why learn another layer on top? What if you had to hire new developers? You’d have to teach them the framework, and look back at how long it took you to become an expert in the framework, not learn it, but become an expert. Why an expert? Because you made a lot of mistakes while you were learning it, and you can’t afford that with noobs.

Build your PHP code to make sense, and the same goes for code as it does for UI. If it takes more than 3 clicks to get somewhere, it’s probably too complicated. And you know what? No one is going to want to work on that project. Sure, you can hire a framework or CMS specialist and pay them twice as much… but why do all that when you can get two developers for that same price with a simpler system in place? Response / request. That’s it. That’s what the browser understands. Built it that way, and stop calling everything an application as if you were building something in JAVA. Focus on architecture, not frameworks.

The shortest path is one best known. And surprisingly, most php developers know php.

  • WithheldName

    He’s right. And the industry is slowly learning this. A few years ago, every PHP job ad seemed to require knowledge of frameworks. Now, most don’t seem to mention frameworks at all. Or they’re looking for people who can “raw-code…without frameworks”!

    Frameworks were a quick-and-crude way to try to thrust object-oriented programming into “unsophisticated” web development. But instead of organizing applications into truly meaningful object concepts like product detail pages or customer entry forms or navigation menu items, we got one-size-fits-all classes for “models”, “views”, and “controllers”. It was instant OOP…but brutally clumsy and empty. It was superficial OOP…elevated to a religion.

    But the author is even more right when he points out that third-party heavy code-generating frameworks of any kind have generally been underused, maligned, and short-lived since the 1990s when they first appeared. Anything that gets too much in the way of a raw language and its libraries…effectively tries to become a language unto itself…and compromises the underlying language as much as it extends it. Compatibility always becomes an issue. Multiple frameworks and versions always proliferate…none compatible with any other.

    Frameworks allow initially building complex applications rapidly…but they shackle the application in chains…and kill the spirit of coding in the process.

    • Ray

      “kill the spirit of coding”. That right there is it in a nutshell. I absolutely LOVE coding but frameworks take all the joy out of it.

  • Pierre-Henri BOURDEAU

    ‘not one has stood the test of time over a two year period’

    It’s a troll right?

    I’ve been developing on Symfony since 2.0 (2011) and today I develop on SF3 with PHP7 and everything is fully compatible. So just counting my short experience on this framework, it already stood the test for over 6 years.

    Concerning MVC the concept exist since the 80′ and is used in almost every single language &/or framework (Django for Python, Qt for C++, RoR for Ruby, etc.)

    ‘the JS calls from PHP’ ??? What does it mean? Are you aware that JS is client side ??

    Funny to read such a bunch of bollocks by someone who code on WP, concatenate variables and strings to build SQL queries, use Nodepad++ (btw it is NOT and IDE…) and develop under WAMP… LOL

    • Ray

      Frameworks are soon to be history, get used to it. Besides, frameworks are for noobs and people who don’t really like coding, not real developers.

    • sodapop7

      just because you are using an over engineered, abstracted hand holding piece of shit doesn’t make you any better than a WAMP developer or any developer. So take it easy on your comments before degrading other people and their opinions. Nodepad++ wtf is that? You used 3000 files and abstractions to implement a web form because you don’t know how to organize your code efficiently or sanitize a fucking string? Idiots like you are responsible for unmaintainable codebases in most companies.

  • Gentry


  • Ray

    I totally agree. I’m a CorePHP person myself but now I’m being forced to learn CakePHP because of a newsletter app that was written with it before I started working here. What a pain in the butt. I can’t even create a blank “testpage.php” file to test random code on without having to create a controller, a model and a view for it. Are you kidding me? Yeah, I have to agree that frameworks are not the future of web application development.