The MicroPHP Manifesto - What People Are Overlooking

Yesterday, Ed Finkler (aka Funkatron), posted a blog called 'The MicroPHP Manifesto,' in which he describes why he thinks people need to get back to basics and look at small, concise libraries. He likened the current trend of PHP turning into Java to rock n' roll drum sets. He compared the massive drum sets of prog rock bands like Rush (representing massive frameworks) to the simple ones of bands like Black Flag (micro frameworks). Many people seem to be focusing on this analogy instead of what Ed was trying to get at.

In most of the conversations about Ed's argument, people begin to argue over why the full stack frameworks are the best way to go. Many people skip over this part: "It doesn’t mean this approach is bad, per se. But when I see it, I have a visceral negative reaction. My brain screams FUCK. THAT. SHIT. I can’t do it. I don’t want it. And I don’t think we have to do it this way to do cool things and build awesome stuff." The first line sums it up - "this approach isn't bad, per se."

Take a step back, and look at your project. Do you really need a full stack framework, or do you just need a few parts like routing, DB, and templating? For example, my wife needed a website for the side business she has for baking. I could have used Wordpress, but the site is basic and doesn't need everything that Wordpress provides. It also didn't need all the stuff that Zend Framework comes bundled with. I wanted a site with a few tools. 30 minutes later I put together a site using Slim, Twig, and Swift Mailer.

"I don’t want to be the prog rock superstar, writing a pretentious rock opera. I want to play shitty power chords in a punk rock band that plays shows in a VFW lodge with no stage, and leaves you so fucking pumped that you go out and form your own band. That’s the coder I want to be." Sometimes, as developers, we need to think about getting the job done. Yes, sometimes I want to write that epic rock opera that is a marvel of code engineering, something that will stand the test of time long after I'm gone. Other times I want to just get the friggin' job done. Those are the times I don't need Zend Framework and the magic that comes along.

Yes, that little side project might come to a point where the micro framework is becoming a hurdle. If your code is well thought out and decoupled it shouldn't take long to port your code to a full stack framework. Most of the projects that I've done that graduated from a micro framework to a full stack went smooth. I can't say the same thing for the full stack stuff that I've done.

I think the big point is, start by looking at your project. Don't just assume you need to use Zend Framework, symfony, CakePHP, or any of the full stack frameworks. Sometimes you need all that, but do you always? Look at the tools that are being compiled on microphp.org and see if they fit the bill instead of a full stack framework.


Comments

Categories: PHP

Tags: microphp, slim, swift mailer, twig, Zend Framework