You are here

Why Frameworks Suck

I clash a lot with most Python coders I meet. You'd think that being such a huge fan of the language (and a constant user of it) we'd all just fall into a kumbaya sing-a-long at first sight, but it never seems to happen; about the only thing we can agree on is that we all love the language, it's downright confusing.

In an attempt to take a decent swing at the issue, I started paying purposeful attention to the kinds of things the Python coders I know tend to align themselves with and came to two answers. The first was a fairly simple one, people who took up learning Python tended to be very into coding and therefore strongly opinionated (and often downright ornery) about all of their decisions, the second was a little more deeply buried: it's all because of frameworks.

I'm a library guy, I like a big set of tools available to call upon at need, I like to have a favorite hammer and a favorite saw and know the tricks for making them both fit on my belt without running into my legs when I am working on something. Framework people like the 5-in-1 lathe-press-drill-saw-grinder and figuring out the tricks to fit the piece of wood they are working on into the machine. When you have a framework everything will be lathe-press-drill-saw-grinded into submission, and you better read the manual otherwise the machine won't even turn on.

If building an application with libraries is playing football with your buddies, building an application on a large framework is playing football in the NFL. You may get money, attention and busty cheerleaders, but what was a game about throwing a ball and doing your damndest to make your best friend eat mud becomes a game about offsides, holding and television breaks; it's just not fun anymore. I don't want to hear about your signing bonus, I want to hear about that one time you threw the ball at the last minute and the receiver just ended up being in the perfect place to catch it for the touchdown.

Frameworks hurt sharing. I'd really like to give you this fork Jimmy, but you're gonna need a knife and plate to use it. The framework checks out all your girlfriends for you, the framework won't let anyone dirty get through, the framework will wait up until you get in, the framework will always find out were you've been, the framework keeps you healthy and clean. Frameworks embrace, extend and hold on to greedily.

Python people do write libraries, quite good ones really, but something has managed to turn so many of them into framework people. They started writing in Python because it was elegant and simple, they could tweak anything they wanted, shape the language into whatever they wanted it to be, Python was the promise of freedom. Frameworks are the opposite of freedom, frameworks are rules, processes and limitations.

I don't know what factors sent my fellow Python programmers down the path of the framework, probably some combination of the ease with which you can change infrastructure level elements, the lack of a unified CPAN-like library distribution model and a short-man complex about trying to get the less common Python into business.

I can forgive those who have to write Java, the only way to get anything done in Java is to have a framework doing all of it already and jump through the hoops that it tells you to, Java is the businessman and is ready to sign forms in triplicate, but Python was the hippie, and few things are more tragic than seeing a hippie have to sit in a cubicle.

Frameworks suck because they are an avatar of enterprise, frameworks suck because they take away your freedom, frameworks suck because they build walls between coders, frameworks suck because they make you fit your project to the toolset rather than the toolset to the project, and frameworks suck because they take the fun out of programming, long live the library.