There’s a large group that seems to think I’m against frameworks of any kind, telling beginners that instead of using a framework they should learn straight PHP, build stuff from scratch.
I’m definitely not interested in that.
In writing about how the framework you learn doesn’t matter, I hoped to advance a position that articulated the fact that among the many frameworks, picking the right one is less important than getting a solid grasp on the underlying language.
In fact, frameworks have tremendous advantages to them. They take care of a great deal of things for us, things that most applications need and nobody wants to write every time they need it. Frameworks are tremendously helpful.
But if you start out from a position of learning a particular framework over the language, you miss out on so much. Laravel may make a database connection available to you whenever you need it, but if you never learn where that database connection comes from, you’re missing out. Symfony may sanitize your inputs and filter your outputs, but if you never learn security best practices, you’re missing out. AuraPHP may handle the request and boil it down to a context object, but if you never learn how PHP handles the request at the lowest level, you’re missing out.
You’re missing out, because when you focus on the framework, over the language, you become dependent on the framework. It becomes harder to go look at a new framework and understand it easily. It becomes harder to contribute back to your framework of choice, because you rely on the magic, instead of pulling back the curtains.
Learning a framework and learning the language doesn’t have to be an either-or scenario, a mutually exclusive set of options. You can adopt a particular framework, any framework, and still focus on learning the underlying language. Open the components and struggle to understand what they do. Read the documentation for the language alongside that for the framework. Play, experiment, test and explore. Adopt packages from outside your chosen framework and learn them, too. There’s a ton of different options for using a framework while learning the language.
The difference comes in your approach. The question I was asked was about which framework I thought they should learn to be the best developers they could. The answer is, “learn PHP.” The framework choice they made wouldn’t have hindered their pursuit of being great developers, but focusing exclusively on the framework itself would. It’s a fine line, but an important one.
Frameworks DO matter. They let many people ship far faster than they would on their own, they help us ensure that our applications are secure, and they provide to us a way of accomplishing common tasks through a framework, if you will. I use frameworks, and I love frameworks. But my knowledge of PHP means I can switch from framework to framework (which coincidentally all have similarities), and use all of them, and that’s a worthwhile goal for any developer.
Frustrated with your company’s development practices?
You don't have to be!
No matter what the issues are, they can be fixed. You can begin to shed light on these issues with my handy checklist.
Plus, I'll help you with strategies to approach the issues at the organization level and "punch above your weight."