Yesterday I sat for the Zend Certified PHP Engineer exam. Within 10 minutes, I knew I was going to fail the test, and less than an hour later it was confirmed. I not only failed, but I totally bombed it, getting what I presume would be a “passing” score in only one of the eleven competency areas being tested on. I walked away with an embarrassing 0% right in databases. Me, who designs our databases, complex queries, and so forth and am generally the query expert in our group.
To say it was a blow to the ego would be an understatement. I left the testing center feeling dejected, embarrassed, and like a fraud. I went home and moped a bit, at some chocolate, and the next day vented to my partner and another friend. Both offered encouragement that it was not a sign I was bad at my job or somehow a failure or a fraud, and while the words were appreciated, my brain is still struggling to accept that.
Because I realized the test showed something that had tickled my subconscious while writing my post on converting an app from Zend Framework 2 to 3. It starts with, what I see, as a differing philosophy between ColdFusion frameworks and PHP ones.
With ColdFusion frameworks, if you used them correctly, it should be a relatively simple matter to replace one framework with another. This is because your gateways, entities, and services were framework independent and all used pure ColdFusion for their coding. Because of this, I still heavily used ColdFusion, and the frameworks were just nice helpers for handing off the simpler stuff like page management, routing, stuff like that. This was part of the philosophy of all the major ColdFusion frameworks – keep the true underlying code agnostic to the framework.
With PHP frameworks, at least the popular ones, that does not seem to be the case. Sites built on Zend Framework are heavily reliant on Zend and could not be easily switched to say Laravel or Symfony without major rewriting of the gateways, services, utilities, even forms One doesn’t just use Zend on top of an underlying PHP app, you use Zend period – it takes over not just the light stuff you don’t want to waste time on, but the heavy bits like database queries, building/consuming XML, building/consuming APIs, sending email, identity managements, etc. In using Zend, you have little need to use more than the most basic of PHP to actually build, manage, and run complex PHP applications.
As far as I can tell, Laravel and Symfony are the same way, the framework code is used heavily in not just the controllers and routers, but also the gateways, services, etc. While this makes it even easier to quickly build applications, it also divorces developers from using significant chunks of PHP and makes it far more difficult to switch between frameworks (or even between different versions of the same framework if there are a lot of structural changes).
Now before someone goes and points it out, I also recognize that using all those components is a choice. One could just as easily endorse the same philosophy as we had with ColdFusion: keep the meat of the app framework agnostic and just use raw PHP. But that wasn’t what is encouraged when you start using any of the PHP frameworks. The tutorials and guides all lean towards using all of its functionality, not just the overlying parts.
Is that wrong? Not necessarily, but for me at least it became the difference between me being a damn good ColdFusion programmer who happened to use Mach-II and a Zend Framework programmer who knows enough basic PHP to use Zend Framework. It was the difference between my acing the ColdFusion Certification Exam years ago and my so completely bombing the PHP one.
What does it mean going forward? I honestly don’t know yet. I could stop using the meatier Zend Framework components, and start using the Framework similar to how I used Mach-II, decoupling the guts and taking them back to pure PHP. That would certainly get my hands in more of the aspects of PHP that I have either never touched or haven’t touched in some 20 years, and get me back to really programming.
Or, I could decide that I am NOT a PHP programmer, and that I’m okay with it. Problem is, I don’t think I can be okay with that, and I don’t think I want to be. So I guess I better figure out where to start next.