Most PHP Frameworks are not for programmers

Published on 2013-04-17.

A small article about PHP frameworks, design patterns, and the art of programming with passions.

I believe that within every craftsmanship there exists two kinds of people. The craftsman who really enjoys the work he does and the craftsman who does the work he does, not because he enjoys it, but because it's just what he does to make a living.

Some programmers make programs to get work done, to get the work out of the way, so to speak, and cash in the money. Other programmers make programs and enjoy the work as if it was an art form. They take great pleasure and joy in the work they do, and they would do it, and keep doing it, even if they don't make any money on it.

Most PHP frameworks take the joy out of the work, especially a framework like the Yii framework. With a click of a button you have a running application ready to be extended, within the boundaries of the framework of course.

This is not programming this is mass production.

It makes sense to reuse code that already does what a programmer wants to achieve, and there is no point in building the same application from scratch every single time, but in todays world of PHP programming there has arisen a "trend" in which many programmers use frameworks for all their productions, not only that, many people would strongly criticize a programmer for wanting to develop his own product from scratch with arguments like, "you're re-inventing the wheel!"

Really, the analogy of a wheel is flawed and it's like saying to a car producer not to make a new car because the car already exists!

Some wheels are made of wood while others are made of metal, none of the popular PHP frameworks follows the same structure or functionality, they too are very different.

One framework is overly complicated and takes forever to understand how it works, another enforces a very specific work flow upon you which allows for very little room for freedom, yet another is too simplistic and lacking even basic functionality.

Then let's throw in the modern, very misunderstood and very misused, notion that every problem fits a particular pattern. Rather than thinking creatively, developing ideas and skills, enjoying the work, the programmer is now struggling to make his particular problem fit into one of the popular so-called design patterns. If it doesn't fit, he'll have to make it fit!

If we where to extend the misuse of design patterns and frameworks in the world of programming (especially in PHP) to the real world, then we would all be driving the exact same car, living in exactly the same house, and not much would be different except for the colors on the wall perhaps, and if someone would dare to think about doing things differently, the person would be scoffed and frowned upon by many self proclaimed masters.

In my humble opinion most frameworks and design patterns stand in the way of creativity and independent thinking!

Rather than spending time enjoying developing a single functionality which performs a specific task, a person can use a particular framework, which has a class that achieves the same goal. Yet the framework class, having been strictly developed with each class representing a particular design pattern, depends heavily on other classes in order to make the stupid thing work, making it load 43 classes in order to achieve the very same goal, and now the developer doesn't even understand what is going on, because following a trail of 43 classes would take at least four times the amount of time it would take to develop the functionality from the ground up.

What is the point of bootstrapping a framework that requires 57 classes just to write "Hello world" on the screen?! That's just ridiculous!

One of the wonderful things about programming is that a problem can be solved in many different ways.

Once we try to force everyone to solve their problems the same way as everyone else, we destroy the possibility of someone suddenly improving upon something everyone else has overlooked.

I believe that the most brilliant ideas in the world originated from people thinking outside the box way outside of the box.