@sean
🔥 40 day streak
602 words

This is why clojure needs web frameworks

I don't know what level my programming ability is at, I'd like to say I'm an expert, but I may also be one of those 1 year of experience 10 times people 😬, you never know. I do know one thing after embarking on a journey to write 12 web/native apps in 12 months on top of my own clojure framework, web developers need frameworks, not libraries.

In the zone

I know it's called flow, but you know what else is called flow? A woman's period. So I call it the zone because I'm not sexist and I think all programmers can enjoy this state of productivity. When writing a web app or really, let's be honest, a website, you want to achieve this state of uninterrupted concentration. You get more done in a much shorter period of time than you normally do and it's great fun! What's one very good way to achieve this heightened state of being? Web frameworks. There, I said it. Clojure web devs are in this weird mindset of denial when it comes to how great web frameworks are. Picking a choosing libraries would be great if you didn't have to context switch and try to search for the library you need. I'm honestly not sure why choosing between different database migrators or different url param parsers is a good thing. Which leads me to the next problem with the library approach.

The paradox of choice

It seems like it would be great, maybe to have a bunch of options for which auth library, which url param parser, which router or which html renderer to choose from, but in practice it adds to the cognitive load of making a website. I don't really know how many rails, laravel or phoenix devs thought to themselves, oh I don't like the way the url params are parsed, I should swap that out. No, they're too busy making websites and not getting bogged down with a bunch of unnecessary decisions. Perfect is the enemy of good enough and think this focus on libraries is a hold over from the clojure's lisp roots where we're all striving for code prose perfection instead of just making things and putting them out there. You could extend this to the frameworks themselves, but I'm not claiming that there should only be on true framework, I am claiming that making a decision about which framework to choose vs the individual pieces is a much more worthwhile decision. Having different whole frameworks to choose from is definitely a great thing. Clojure should have plenty of frameworks to choose from, unfortunately it doesn't. People either point to luminus (which is just a collection of libraries) or GTFO. I mean what would a blog post about web frameworks be with a masterfully timed plug of some open source framework the author is working on?

Embrace the framework, be the framework

Coast on clojure everybody, great name, even greater contributors. Why should you pick coast as your next web framework? I'll tell you why: clojure. No, but honestly I think it brings some new concepts to the table that you don't often see in a web framework in algol-inspired langauges. The relative dearth of code you'll be writing is really something to behold. Clojure really is a great language for making websites quickly, securely and with the least amount of bugs you can muster. I'll get into coast more and more in 2019, but for now, I have to back up and make the case for frameworks in general.