Overwhelm by Complexity

The very first programming framework I have ever used was CakePHP. That was around the time when the MVC framework was hyped (around 8 years ago if I remember correctly). But to say my experience with it is not so good. In fact, I remember I fought with it way more than I really used it.

The reason, if I am asked now, was that I hadn’t really developed a really large web application before, and a lot of those helpers/indirections didn’t make sense to me at all. It just overwhelmed me. Really. There are lots of things to learn: MVC, ORM, conventions etc etc etc. And that time I was very naive.

Even today, frameworks usually require you to understand many things to do anything useful (not just a standard simple blog tutorial). Even though I have progressed a lot in my code-fu since that time, I still find a lot of things today overwhelming to me.

The complexity of how things work together, or how data flows in a large framework, is mind-blowing. To top that off, it is usually not very well documented (though experienced programmers will usually be able to guess it easily). I haven’t really used a large framework in quite a while, so maybe things have got better since then.

There was a time when I was against a large framework.

But that was a mistake.

I realised that way later than I should have.

Of course, I am not saying you should just use large frameworks and deal with them. On the contrary, I am going to recommend not using it for now.

Of course, when I was against large frameworks, I just cooked my own small framework to use (I think it is still alive somewhere in the project hoster – it was named Litecode). But after a few projects, I start searching for a micro framework to use instead. Why? Because it is usually not worth the hassle of maintaining it, especially fixing bugs in a code path that wasn’t used in past projects.

Then I developed a large application, using my own glue code to combine several micro frameworks together to provide all the functionalities I needed. And it was quite painful to maintain. Because it was a mess of cross-framework glue splatter everywhere in the code.

For my next application, I decided to develop my own indirection code. As I continued with the project and refactored the indirections/glue code, I came to the realisation that these are exactly what the large frameworks are providing.

Of course, the above was in the context of the PHP web application framework. But I have done the same with many other things too: game framework and graphics framework to name a few.

What I want to say is that: do question how existing things are implemented, divulge into it, tear it apart and study how things are accomplished. Then start writing your own, based on your idea, in a real project. Chances are, you will likely arrive at the same method anyway. But it will be very educational.

But that is only if you have time. If you don’t – just use whatever you are familiar with. It is usually not worth it for a time-tight project.

I haven’t updated this blog in a while, and I apologise for that. I actually have a lot of unfinished blog posts I wrote, but as it is unfinished, I can’t publish them yet.