First Timer Builder, Long Time Architect

Within the world of web applications, and much more relevantly within PHP, there is an abundant choice of frameworks available for use. It almost goes without saying that any project begun nowadays has at its foundation some form of framework, if only to remove the tedious repetition every project involves (requests, routes, database, caching etc). Within this world of frameworks though, two groups continually push to create new frameworks.

The first are the architects. Developers who have written code for every possible situation, distilled the common functionality and enshrined the best practices. Kohana, Zend, any of the big frameworks nowadays have a solid technical foundation which provides a great starting point for most (but not all) applications.

The other group however are the newbies. Developers who are just breaking free of the copy-paste phase and starting to write code on their own two feet. Every time they give the same argument as to why they’re creating their own system versus re-using existing frameworks and libraries. Typically it comes down to: performance (my code is bespoke so it’s the fastest it can be), “can’t understand others code”, “don’t know why you’d use MVC”, “it doesn’t do everything I want” or any number of other excuses. Ultimately though it’s because of NIH Syndrome.

Yes they’ll end up with the rudimentary basics of a framework, admittedly with unusual terminology and globals strewn across the place, but in my opinion this is more important than using any framework.

Think about it; when we approach a new project we already know what it’s going to need and have written similar code a thousand times before. We know what changing a View layer takes compared to extricating HTML from across a dozen different files filled with business logic and database calls. But to the beginner, splitting a website into three (or two if you don’t like models) layers and all the necessary extra files and handling that requires seems insane! Better to just keep it all together.

Then they start another project. They might want to reuse a thumbnail system but end up spending more time rewriting it to remove references to the previous site. Then the designer they’ve teamed up with wants to add their shiny HTML to the app but ends up breaking the logic.

Only by seeing why not can most new developers see why. That’s why it always infuriates me when people bemoan a new developer for not using an established framework. Imagine trying to understand Zend’s layer upon layer of abstraction if all you’re used to doing is a simple function call.

So I say, let the newbies shoot themselves in the foot. Just be ready to show them how to turn their spaghetti into a nice three course meal.