TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Dichotomy Between Frameworks and Libraries

1 pointsby ShalokShalom5 months ago

2 comments

Someone5 months ago
I don’t see how the “are evil” follows.<p>It’s like houses vs furniture. Houses don’t compose, shape what you put where in your house, but that doesn’t make them <i>evil</i>.<p>A framework is less flexible than a set of libraries, but also less hassle to use, if you want to build something that it’s made for.<p>A framework that’s flexible enough to build a wide palette of things can be quite useful.
ShalokShalom5 months ago
I think the dichotomy between frameworks and libraries appears from the observation that both concepts are good at what they do when they are designed with the opposite principle in mind, to which they are implemented themselves.<p>In programming, everything sits between two poles.<p>Pure and impure, centralized and distributed, limiting and freeing.<p>Without limits, there is no experience of freedom.<p>Keeping you in line on the highway will ensure your freedom to move on it.<p>Limits are not always limiting, and a lot of freedom can be confusing as heck.<p>As Clojure and C++ developers ;)<p>The same I observe around libraries and frameworks.<p>I used to think as the linked article describes it (and there is a lot of truth to it)<p>And I think I found a couple of other layers to it.<p>Libraries let you call them and frameworks call you.<p>Libraries are imported by you, and that means you are in charge.<p>Frameworks are the opposite: They &quot;import&quot; you, and you do as they desire.<p>They are restrictive and style your code.<p>Frameworks dictate how you code - libraries deliver to you, what and when you need it.<p>The issue is, that libraries are the best, if they are as limited in scope as possible, and frameworks are best when they are the opposite.<p>I think that is, what confuses most people about it:<p>Frameworks introduce a certain coding style and dictate the way things are implemented.<p>But that doesn&#x27;t mean, it has to be limiting.<p>The Node system in Godot allows you to compose your actions very freely, allowed by using composition over inheritance, and certain other decisions.<p>The implementation of this specific framework allows you to move freely despite that you have simply <i>no other way</i>, besides using it.<p>You are forced to freedom, basically.<p>It is limiting, but it is not.<p>That contradiction is probably, what causes many people to dislike frameworks at all.<p>They experience mostly bad ones.<p>A framework can be limiting on <i>HOW</i> you can do things, and this can still result in a lot of flexibility.<p>A library can offer a lot of things, but this might turn out bad if the consequences are not easy to foresee.<p>How often did you load a library, that behaved unpredictably, changed its behaviour from one update to the next, or was simply implemented badly?<p>If all libraries were that way, we would dislike them as well.<p>That is also where the saying &quot;do one thing, and do it good&quot; fits right in.<p>It is simply a guide to good library design.<p>So, when looking at frameworks and libraries, we have to differentiate between the respective way they interact with the rest of the code and the practical effect they bring to our code.<p>We should not mistake the way they are implemented, with the effect it has on us.<p>This sounds easy enough, although I think it&#x27;s tempting to believe, that the face value is always mirroring the inside.<p>So, all that doesn&#x27;t take away from the practical limitations, that were raised in the article (and other articles of its kind, see ¹ and ².<p>So far as I can see, the argument is always down to a &#x27;badly implemented framework, that is not enabling a lot of freedom&#x27; and things like a framework simply not being the right choice for the task.<p>If frameworks are about *consciously* limiting freedom, to grant just that, then it&#x27;s about the one thing that we can say computing (and life) is all about:<p>Finding the right tool for the task.<p>Doesnt sound very spectacular, but considering the vast majority of people to whom I talked about this today, did not even know there <i>is a difference between frameworks and libraries</i> and even less so, which one that is, I feel like it warrants a post.<p>And a discussion.<p>¹ <a href="https:&#x2F;&#x2F;timperrett.com&#x2F;2016&#x2F;11&#x2F;12&#x2F;frameworks-are-fundimentally-broken&#x2F;" rel="nofollow">https:&#x2F;&#x2F;timperrett.com&#x2F;2016&#x2F;11&#x2F;12&#x2F;frameworks-are-fundimental...</a><p>² <a href="https:&#x2F;&#x2F;eisenbergeffect.medium.com&#x2F;libraries-and-frameworks-and-platforms-oh-my-f77a0ec3d57d" rel="nofollow">https:&#x2F;&#x2F;eisenbergeffect.medium.com&#x2F;libraries-and-frameworks-...</a>
评论 #42471370 未加载