News for hackers. Stuff that matters.
Re:This Week in Rails: jQuery no longer part of Rails, and more by wfleming on Friday December 09, 2016 @01:02AM (#13136994)
Nikanj isn't wrong (and is funny), but I think the other (more justifiable) reason is that jQuery largely isn't necessary anymore: when it came out, there were an uncountable number of browser incompatibilities that needed painting over, and APIs for remote requests, DOM querying & manipulation and the like were very immature, so a library to make everything usable was extremely valuable.

Now, those APIs are mature & standardized & it's generally not too hard to write vanilla JS that works across all the major browsers.

I don't think jQuery has failed, but for the kind of baked-in functionality Rails wants it's not really needed, and there are good reasons not to pack another dependency into your framework if it will increase page download size & is increasingly unlikely to be used by the framework's users.

Re:This Week in Rails: jQuery no longer part of Rails, and more by mercer on Friday December 09, 2016 @07:30AM (#13138350)
I recall reading that element.querySelector(All) was inspired by jQuery. If true, it means jQuery was so much of a success that parts of it were implemented natively in browsers!

(I couldn't confirm this by googling, so if anyone can confirm or deny that this is the case I'd love to know!)

Re:This Week in Rails: jQuery no longer part of Rails, and more by gsnedders on Friday December 09, 2016 @09:04AM (#13138770)
To some degree, it's absolutely the case that JS frameworks of the era have shaped what browsers have done in the late-00s.

I can't remember the detail of document.querySelectorAll; it was first proposed around the time jQuery was originally released.

element.querySelector I think was largely inspired by jQuery's usage of it (in part to make it easier to run more of jQuery's selectors natively!).

Re:This Week in Rails: jQuery no longer part of Rails, and more by dom0 on Friday December 09, 2016 @04:56AM (#13137784)
Exactly. For my little JS needs I just use vanilla JS (even though the APIs are poor and the language is worse), since it will very likely work across all browsers I care about (recent FF/Chrome/Edge).