What makes a good framework

The other night, I watched Yehuda’s talk, Ember.js, State of the Union. One thing Yehuda said strikes me. He briefly talked about framework’s internal modularity and how a framework should be presented to developers.

There’s no doubt a good framework needs to be modular, so that changes can be easily made and new features can be added in relatively easily. I see 2 types of modular framework out there.

  1. Modular frameworks that are branded to be opinionated, a.k.a, Rails. Despite its modular internals, from the outside, you use the framework as instructed, no more, no less. Out of the box, it solves a typical type of problem. However once you become confident and efficient with it, you have the power to ride the Rails with your own way, thanks to its modularity.
  2. Frameworks that are modular, and the framework provides the modules as building blocks. Things are then left to the devs to work out, a.k.a. Zend Framework. It’s super flexible, but it’s hard to figure out how to handle the beast. You need to do all the glue work yourself. Put the pieces together yourself. The steep learning curve often leads to mis-use, and yes that’s talking from self-experience.

So what makes a good framework? Back to what Yehuda said, it’s gotta be modular, with an easy and default way to interact with the framework. The framework needs to set sensible defaults out of the box.

Rails does this really well. Maybe one day I’ll outgrow Rails, but for now, I can’t be happier.

To back me up, just compare how Zend Framework and Rails handle building web forms (yes, that’s what we do on the web all the time…)

What one is better? You are the judge!

Published: 2012-09-07
blog comments powered by Disqus