Web Development

When to reach for a framework (and when to skip it)

Frameworks are productivity multipliers when they fit the work, and productivity dividers when they don't. The mistake we see most often is teams reaching for a framework because the role description said it should, then...

N
NapMap editorial
3 min read
— Web Development —

Frameworks are productivity multipliers when they fit the work, and productivity dividers when they don't. The mistake we see most often is teams reaching for a framework because the role description said it should, then spending the next six months working around its assumptions because the assumptions didn't quite match the problem.

The honest test for whether a framework fits is whether you'd reinvent most of it if you didn't use it. If the answer is yes — you'd write your own router, your own ORM, your own job queue, your own template system — pick the framework, save the time, and move on. The cost of writing those primitives badly the first time is much higher than the cost of learning how a mature framework wants you to write them.

The opposite case is more interesting. Sometimes the framework's philosophy fights the project's nature. A heavily document-shaped data model under a relational ORM, or a streaming-first product under a request/response framework, will work, but every interesting feature will require an escape hatch. After enough escape hatches, you've built a worse version of the framework you'd have written from scratch, plus the framework you're working around. That's the worst combination.

A better question to ask early is: what does success look like for this codebase in three years? If the answer is "a stable, hireable, predictable product with a known team rotation," frameworks help — they give the next engineer a known map. If the answer is "a fast-moving prototype that will be rewritten if it works," frameworks can slow you down by demanding ceremony you don't yet need.

The middle case is the most common. You want some primitives done for you, you want the rest free. The right move there is usually a small, opinionated framework — one that gives you routing and an ORM and gets out of the way — rather than a maximalist framework that wants to own your worldview. The trade-off is that you'll write more glue code; the upside is that you keep the option of changing your mind in eighteen months.

The signal that you've made the wrong choice is usually clear within three months. The team is writing a lot of "framework configuration" code that doesn't directly serve the product. PRs spend more time on framework idioms than on user-facing logic. New hires take a month to be productive, not a week. None of these are individually fatal; together, they're the smell of a framework that doesn't fit.

The article we'd recommend works through five real switching decisions: two teams who switched to a framework and were better off, two who switched away and were better off, and one who tried both and stayed where they were. The retrospective on the last team is the most educational, because it's about a hard call that didn't have a clean answer.

N
Curated by

NapMap editorial

Curated content recommendations from independent publishers.

We use cookies

Essential cookies keep the site working. With your permission we'd also use analytics + ads cookies to understand readership and pay our publishers — you can change this anytime. Privacy policy.