by danpalmer · 2y ago · 0 comments
My rule of thumb is to look at the feature list for a web framework (Django, Rails, Citizen, etc) – sessions, caching, ORM, rendering, routing, auth, admin, static files, APIs, serialisation, etc etc – and if you need 3 or more, just use a framework that has them all properly integrated.
Example, you're sticking an internal API on your ML model, you need one or two endpoints, and to return some JSON. Just use Flask/FastAPI or whatever the equivalent in your ecosystem is.
Alternatively, you're building a user-facing website, you need routing to endpoints, auth, sessions, and a database. Just use a big framework. You'll likely add more of those cross cutting concerns in the future anyway, and having them all work together rather than gluing libraries together will save a ton of time.
Citizen is the first convincing framework I've seen for this approach from the Node ecosystem. Congrats on the 1.0!
Every "framework" available when I started with Node seemed to be a collection of loose opinions regarding Node best practices, lightly dusted with syntactic sugar. Functionality I considered table stakes for web apps usually involved choosing from several middleware packages with different maintainers and different syntax. Didn't like it.
Thanks for the compliments. I hope the community sees the value.