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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Drop jQuery as a dependency from Rails

292 点作者 robermiranda将近 9 年前

11 条评论

stevepike将近 9 年前
The github thread itself is a nice example of a vibrant open source community. They're thinking about whether the project can be a good entry point for others into OSS, considering adopting outside libraries rather than re-writing it themselves, and generally operating in a pretty positive manner.
评论 #11816345 未加载
monk_e_boy将近 9 年前
As a web dev for the last 15 years or so, this is amazing news. The browsers are finally getting to a point where the pain jQuery solved, is going away.
评论 #11814087 未加载
评论 #11814341 未加载
评论 #11814011 未加载
jacobsenscott将近 9 年前
For everyone who thinks rails installs too much by default, and hasn&#x27;t ever tried `rails -h` - here are some options:<p>--skip-gemfile --skip-git --skip-keeps --skip-active-record --skip-sprockets --skip-spring --skip-javascript --skip-turbolinks --skip-test-unit
评论 #11816261 未加载
spriggan3将近 9 年前
Rails should stop messing with Javascript all together. Drop JQuery, CoffeeScript, TurboLinks and what not and let the users decide what to use, make it optional. Rails shouldn&#x27;t require a JS engine in order to run.
评论 #11814018 未加载
评论 #11814027 未加载
评论 #11814069 未加载
评论 #11814031 未加载
评论 #11814323 未加载
评论 #11814410 未加载
评论 #11814869 未加载
评论 #11814469 未加载
评论 #11814137 未加载
评论 #11814039 未加载
评论 #11814540 未加载
评论 #11814611 未加载
评论 #11814669 未加载
Gonzih将近 9 年前
I never understood why rails has javascript helpers at all. It just does not bring any value in the long run, just complicates stuff. Rails should be js libraries agnostic and not provide any js related helpers out of the box in my opinion.
评论 #11817550 未加载
评论 #11815472 未加载
评论 #11814915 未加载
评论 #11814397 未加载
kendallpark将近 9 年前
So I did this in my own recent project. Then other JS libraries I was using needed jquery and it went right back in. I think many people will run into this.<p>I do agree that it should get out of default Rails. GJ community.
stephenr将近 9 年前
There was an article about a week ago that makes the claim that Rails is tailor-made for Basecamp.<p>This single comment absolutely confirms that point of view: <a href="https:&#x2F;&#x2F;github.com&#x2F;rails&#x2F;rails&#x2F;issues&#x2F;25208#issuecomment-222980490" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rails&#x2F;rails&#x2F;issues&#x2F;25208#issuecomment-222...</a>
评论 #11814947 未加载
评论 #11814624 未加载
评论 #11814576 未加载
评论 #11815400 未加载
tlrobinson将近 9 年前
Related: <a href="http:&#x2F;&#x2F;youmightnotneedjquery.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;youmightnotneedjquery.com&#x2F;</a>
aphextron将近 9 年前
An irrelevant framework drops another irrelevant framework as a dependency.
applecore将近 9 年前
<i>Omakase</i> implies a certain level of excellence in all the individual choices.<p>I believe Rails is In-N-Out Burger. While it offers few choices, it&#x27;s reliable and the hamburger is very good. The fries and frontend framework are acceptable but no one goes to In-N-Out for the fries.
评论 #11815908 未加载
评论 #11814263 未加载
评论 #11814681 未加载
评论 #11814473 未加载
评论 #11814381 未加载
评论 #11814792 未加载
评论 #11814797 未加载
tacos将近 9 年前
Someone in DHH&#x27;s position could approach jQuery and request a subset containing what he needs. And then other projects could benefit from the refactor.<p>If there&#x27;s even a benefit. This same post by the leader of any other project would involve a study of which components and apps use jQuery. And would state how far back compatibility is to be maintained.<p>So, for example, if commonly used gems require it, or if 90+% of the rails apps in the field require jQuery for other reasons, then this is just code churn for no benefit.<p>And why is this even a &quot;rewrite&quot;? You can suck the relevant lines of code out of jQuery and call it done. This is not a &quot;Summer of Code&quot; length endeavor.
评论 #11814154 未加载