TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Library patterns: Why frameworks are evil

36 点作者 kretaceous29 天前

5 条评论

pmontra29 天前
If I&#x27;d have to spend my career developing and attending to a single product, a set of libraries would be all I need. I can fill in the blanks and connect them and write and maintain any missing pieces.<p>However I work for customers, many different projects, and I&#x27;m more than happy to work with Ruby on Rails, that enforces a common structure to every project, lets me predict where files are and what they do, etc. The advantage is in all the time not spent on learning from scratch every single project. I can start working on the very first day. Even Django, which is mostly anarchy compared to Rails, is better than complete anarchy with every single project using different tools and having a different architecture.<p>Furthermore projects started with Sinatra and Flask and similar tools quickly evolve into something as complex as Rails and Django, with tons of home made fragile code. There is never the time to make them robust, because nobody is working full time on those projects for years. Basically frameworks allow developers to multitask among projects which is great for consultants and also for customers, because they don&#x27;t have to pay for the extra developers.
评论 #43714901 未加载
frje140029 天前
Perhaps &quot;frameworks don&#x27;t compose&quot; and &quot;frameworks shape how you code&quot; are actually good features, not a problem. Where are frameworks the most popular? Probably for web services (e.g. Spring Boot for Java). You don&#x27;t need them to compose because you will only have one.<p>That you are forced (or at least strongly nudged) to code in a certain way is good because that means that all your web services are at least superificially familiar to all developers at the organization. That special service composed from many libraries? Impossible to work on without significant time investment.<p>I suppose though that if you are in a domain where you actually would want a library, but all that&#x27;s on offer are frameworks, and you actually need to compose them, then yes, that seems problematic.
评论 #43713988 未加载
评论 #43714581 未加载
Fire-Dragon-DoL29 天前
I saw go codebases started by devs frameworks.<p>Give me back rails.<p>Urgently
submersed672228 天前
... and in the end, frameworks are better if you plan to work on more than one project in your life.
padjo29 天前
The click bait title worked on me but come on, it’s like saying screwdrivers are evil or something. A framework is a tool that’s appropriate in some circumstances and not others.
评论 #43714144 未加载
评论 #43714045 未加载