How to make your own PHP framework

1 minute read

Or: Why you shouldn’t

It’s almost a rite of passage among PHP developers. Just about every one of us goes through it. We look at the vast array of frameworks available, and we think to ourselves “I can do it better”.

Well, not to stifle your creativity, but you can’t. You aren’t going to write some magical framework that will be better than all the rest. At least not for everyone. It might be the best framework for you, but then you are a little biased (just like a parent is with their kid. We all think our child is the prettiest/smartest/most talented child in the world. But we can’t all be right).

Don’t get me wrong. I’m not saying you shouldn’t make your own framework. After all, I did say it was like a rite of passage. For some reason we all have to do it. But the truth is, you will ultimately fail. But it’s not [completely] your fault. It’s just not possible to please everyone all the time. You can get close, but eventually there will be things about your framework that someone else thinks could be done better (and thus the cycle begins again). Let’s face it, the reason you will fail is the same reason you started. There is no such thing as the “perfect” framework. They each have their pros and cons. You simply have to decide the best choice for the project you are working on.

Here’s an idea though. Instead of starting down the path to building your own framework, why not pick an existing one that is close to what you want and start contributing to it instead. We can’t individually create the best framework, but together we can make the ones that already exist better. Open source works best as a community effort. If everyone only ever took but never gave back, some of the best frameworks out there might not exist today.

In no particular order, here are just a few to pick from (believe me, I’m sure I don’t have them all listed. If your favorite framework is missing, my apologizes):

Categories:

Updated:

Leave a Comment