It’s almost November and boy has 2013 been a rough year for PHP. From what I gather, it’s “hip” to hate PHP right now. With so many outsiders, and insiders, fighting and bashing the language and each other as if they were high school rivals, I’ve been rather surprised and elated to see the formation of the PHP FIG and the work they’ve done with the PSR standard. Having so many library and framework authors come together, agree upon a standard way of doing things in order to make their code interoperable, and then actually upgrading their code to meet said standard is an amazing feat that just a short while ago would have seemed impossible.
Now is an exciting time for PHP. New features are being proposed, added, and implemented faster than any previous time in history. PHP drives the world’s largest website (Facebook) and powers the world’s most popular content management system (WordPress). With so much love for open source, social coding, and cooperation amongst the industry leaders and PHP community as a whole, why are we still fighting over what comes down to either: A) Personal preference, or B) The right tool for the right job.
Shut up and build your shit!
My first intro to PHP was through the framework CodeIgniter. It taught me so much about PHP as a language while making it easy to accomplish tasks beyond intro level ability. Granted, I did learn some bad habits by adhering so much to the syntax of the framework as opposed to vanilla PHP. Through the years my abilities have grown, my practices have become more industry standard, and I have branched out into other frameworks. I’ve even written a micro framework that I use in my job to work around the limitations of their internal system.
One principle that drives me daily is to use the right tool for the right job. When I used to build websites from scratch, I had three CMSs that I would choose from (Joomla!, WordPress, PyroCMS). Each one met a different set of criteria for each job, and I had a certain comfort level in each system as well. I no longer build websites, but with any new custom application I write, I start by evaluating the needs and requirements of the job. My framework of choice at the moment is Laravel but I still go with the classic CodeIgniter from time to time depending. These happen to be the frameworks that I am currently most comfortable with and allow me to do my job quickly and efficiently. I’m eager and willing to try other frameworks as well. I love new things. I love playing with new things even more.
My rant here is inspired by a recent post I read (Publish Your Failures; or, The Way Of All Frameworks), and the comment banter between the post’s author, Paul M. Jones, and the author of Laravel, Taylor Otwell. The post is a good read and I encourage you to check it out (if you haven’t already). I get frustrated reading the comments between Taylor and Paul because I see two wonderfully brilliant men going back and forth over something so simple as an opinion. That’s what these are, opinions. Really, that’s what their two (and any) frameworks are, they are opinions. Any framework is just an opinion of how something “should” or could be done. There is no right or wrong way to go about a problem. There are no right or wrong opinions, just our perception of what is “right” and what is “wrong” based upon our own personal opinions. I am not without my strong convictions and preferences/opinions. I will argue a syntax with my coworker until we’re blue in the face.
In the end, if the code solves the problem and solves it well, who cares how you did it, what framework or library you used, or whether you used spaces or tabs? It doesn’t matter. Let’s all learn to appreciate each other for what each of us brings to the table. Let’s all encourage each other to grow and learn. What sets the software community apart from any other in the world is the openness and the fact that the amount of encouragement and positivity greatly outweighs the amount of discouragement and negativity. We have the privilege of being a part of something greater than ourselves, and we have the responsibility to put aside our stubbornness and egos and to give back to others.
Remember people: