Fork me on GitHub

hey y’all, I wrote a blog post: Frameworks and Why (Clojure) Programmers Need Them

bravetrue 4
Alex Miller (Clojure team)21:08:08

I had such a negative reaction to the first sentence, I can't bring myself to read it. Seems totally unnecessary.

💯 12

hey Alex - thank you very much for this feedback 🙂 I’ve updated the post to use more neutral language and to not sound as if I can speak for the entire clojure community. I’ll respond more on reddit to keep the convo in one place


> I had such a negative reaction to the first sentence, Personally I didn't, maybe influenced by prior writing by Daniel (i.e. I know his writing is intended to be funny and lighthearted) But I also can see how that particular sentence might catch people off-guard.

❤️ 4
eccentric J21:08:06

Frameworks that emphasize breaking things down into common data structures that I can manipulate with simple functions are great. I feel where it gets messy is when they introduce bespoke vocabulary that only reflect the author's perception of the problem they are trying to solve. That's what lost my interest in Phoenix in Elixir. It may not have classes\objects, but it also introduces extra vocabulary like Plugs which share no principles and can only be learned through extensive doc reading. What I love about a library like Ring is that I barely had to read the docs. I also don't have to think about which version of ring a handler is using because it's just a function that receives a request hash-map and returns a response hash-map.

👍 24
💯 4

I think the it’s just a _ position is a reductionist posture that contributes little to a conversation like this. It rubs me as dismissive to the propositions being advanced without actually addressing them.


To be clear, the first portion of that remark is fine (with me). I’m just picking on the second cause I see it so often.


FWIW I think a better way to frame these discussions is with respect to specific contexts. It’s not “Why” it’s “When”.


the most striking thing to me about frameworks is that they’re so successful, in the sense that they’re widely used and people make a ton of money with the products built with the frameworks


I had a great experience with Ruby and Rails not too long ago at a Clojure/Ruby shop. Even though I’m equally proficient in both languages, I found that the process of updating application code in a Rails application was generally more efficient than a Clojure one. Personally, the value of “convention” is hard to devalue in a setting where you have to work with other people. Conventions are great for teams.

eccentric J01:08:34

@U06MDAPTP I’m not quite following. What’s a reductionist posture?


@U8WFYMFRU> it’s just a function that receives a request hash-map and returns a response hash-map This ☝️

eccentric J01:08:15

@U06MDAPTP I see, what makes it reductionist though? What bigger idea am I reducing?


@U8WFYMFRU the structure of it. The appeal to the virtuous nature of a Ring handler being so simple because, look, it’s just these three simple bits.

eccentric J02:08:19

@U06MDAPTP is that wrong? I am not suggesting frameworks are bad, I agree with the article that they shouldn’t be a dirty word. However, I do have some thoughts on what can make a framework more appealing to me. Perhaps a stronger point is that I prefer learning frameworks that apply to a lot more than itself. For instance learning Ring I learned how to setup a simple middleware pattern with composition and how to model a complex problem such as request handling, into pure, data-driven functions. That is drastically different than my ongoing 4 – 5 years with Django where most of what I learned only applies to Django itself. Some of which doesn’t even carry between versions of Django. For instance how you access headers from a Django request class instance changes between 1.11 and 2.0. In Ring, you don’t have that problem. If the community builds frameworks that play nicely with FP concepts and the principles Clojurians typically embrace, I think they may come around.


@U8WFYMFRU I do not think it is wrong. I felt like it was misplaced in the context and that statements with a similar structure in philosophical Clojure discussions [to me] are not contributive. I followed that up because I wanted to clarify that I thought your other remarks were fine. I mean no harm.


I also agree that “framework” shouldn’t be a word we use pejoratively in Clojure.

eccentric J02:08:23

@U06MDAPTP I don’t feel you were trying to cause harm. Was curious if I misrepresented what I was trying to say, if I said something stupid, or there was room to refine it into something more meaningful. After talking I do see your point and will be more mindful of that in the future. 😀


@U8WFYMFRU cool. And, in your defense, I was a tad hyperbolic. 😅

👌 4

To the topic at hand, I think another benefit of using a framework is that it often alleviates you from having to make some decisions up front. For someone that wants to build an MVP that can be huge (suspending for the moment the disasters an emphasis on an MVP can bring about). Of course, a framework isn’t the only thing that can do that right? lein new <template> can do this but I’m not talking about that. I’m talking about structural decisions and conventions.


Take re-frame for example. At its core, its really just an event handling and state management library. We could put those bits together in a number of different ways, sure. So what? Its the conventions of re-frame which make it so useful to the community at large. It gives people an opportunity to get to the part where they can start building shit without having to hack together their own architecture while they build their application.


And its that last part that really resonates with me and why I think frameworks organized around conventions are nice. I’ve now worked for 4 companies seriously using Clojure to build both back and front end applications and I can tell you that, apart from the common libraries they use, I’ve seen many of them architected similarly but each with subtle twists. Those differences are so annoyingly common that think at this point in my Clojure career, I would love to see a framework with broad support in the community.


bb 0.0.7 released: for future updates this week, look in the thread. follow up in #babashka

parrot 12

👍 this channel is slowly turning into #borkdude-releases 😛


I'll post updates in this thread to not overwhelm people.