Live data from Hacker News

Drop jQuery as a dependency from Rails

github.com

121–123 of 123 posts

Re: Drop jQuery as a dependency from Rails

#121

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't require a JS engine in order to run.

You're missing the central point of default rails stack. http://david.heinemeierhansson.com/2012/rails-is-omakase.htm...

Then why drop jQuery? "It needn't be part of the default stack any more" doesn't hold up as a reason any more because it's not about whether something's needed or not but whether it's useful.

Most sites require jQuery, most developers are happy using it, why put the effort into getting rid of it?

Re: Drop jQuery as a dependency from Rails

#123
post #27

Earlier quoted context omitted.

Sure, except in this case the Rails defaults are totally at odds with how the larger JS ecosystem has evolved. CoffeeScript was basically the logical complement to Haml (Ruby-like syntax for HTML) and Sass (Ruby-like syntax for CSS) -- although Sass has since dropped its original syntax and moved on with the CSS-like SCSS. Since then CS has lost a lot of popularity outside the Rails community. Babel and TypeScript pr…

From experience, projects that use any of the available javascript frameworks also use jquery in some way or another. Including it is a tone saver. But coffee script should be removed as a default.

AngularJS (1) was heavily built around jQuery but I can't think of any current one (i.e. more recent than Backbone and Knockout) that justifies that statement.

I'm fairly certain there's not much of a point having jQuery in Ember and there's certainly no point in using it in jQuery (unless you just blatantly append random UI libraries -- most jQuery UI widgets can be implemented with fewer lines of React).

Post reply on HN