Posted on Jan 29, 2009

Working with Development Frameworks

I recently had a slap-in-the-face kind of realization moment after getting quite a ways into a project using an off the shelf development framework. In this case the framework in question was CakePHP, and the realization came in two parts:

  1. I realized that I didn’t like the syntax of the framework, even for doing basic things
  2. Because of the fact that I didn’t like the syntax, things that should have been relatively simple were taking much longer than necessary

It was from here that I made the almost hurtful decision to start again, this time building everything from scratch. Now I couldn’t be happier, partly because of the fact that the project itself is going far quicker and easier than before, but also because I know that the usefulness of this framework will go far beyond this project.

You see, now that I have built a framework that jibes perfectly to my programming style, I can apply it to future projects as well. This is how Ruby on Rails started, and I’m sure how most of the popular frameworks started.

Now here is where I throw out a crazy suggestion – I think all developers should have a go at writing their own framework at some stage, even if it never gets into any of their production work. The benefits of this are two-fold – not only will they now have some knowledge of how the inner magic of a framework happens, but they will have a solid base of framework-y functions that they can use in both personal and professional projects moving forward if the need arises. If you are working in a larger team in your professional life, you might even be lucky enough to customize your basic framework as a collaborative effort for a future project.

Don’t get me wrong, I’m certainly not discouraging the use of existing frameworks if they do what you want, I just think that developers should not take things at face value, and ensure they know not only how to use a framework, but also how it does its thing, and from that come up with reasoning on why they are using it.

And for the record – my framework is called Seven, and it’s the best framework in the world, ever…