Guido van Rossum recently blogged about the difference between libraries and frameworks. He gave Neil Schemenauer’s idea: a framework is basically an application with lots of hooks.
I just realised that a framework is what arises as a side-effect of refactoring your code. This is what happened with Rails and Django - they wrote apps and then extracted frameworks from them. These frameworks might be a good starting point for your own app, but if you do anything non-trivial, you’re likely to extend the framework and not just “use” it.
Therefore, worrying about frameworks is likely to just be a waste of time. Something I noticed recently when useing cakePHP for a project at work is that I quickly begin changeing cake (the framework) to fit my needs and if I don’t keep a close eye on it, then pretty soon I’ll have made so many changes that I might as well fork the project. My project is now the framework and I just hook things into it here and there. Which hilights again exactly how fine the line is between applications and frameworks..
Leave a Response