News for hackers. Stuff that matters.
Re:JQuery by lisper on Tuesday April 07, 2015 @10:22AM (#9334221)
I submitted this because of this comment:

https://news.ycombinator.com/item?id=9333859

"Sorry, but this is like posting jQuery. Who doesn't know about three.js?"

Well, I didn't know about three.js before I submitted it. I did know about jquery, but I was curious to see if it had ever been submitted, and the easiest way to find out was to submit it. So here it is.

And who knows, maybe there are HN readers who haven't heard of jquery. Stranger things have happened.

Re:JQuery by bbody on Tuesday April 07, 2015 @10:29AM (#9334277)
This is cool! I also recently found this thing called Twitter Bootstrap http://getbootstrap.com/
Re:JQuery by lisper on Tuesday April 07, 2015 @11:00AM (#9334492)
Re:JQuery by ntw1103 on Tuesday April 07, 2015 @10:30AM (#9334279)
http://youmightnotneedjquery.com/ -- I'll just leave this here.
Re:JQuery by grahamel on Tuesday April 07, 2015 @10:43AM (#9334377)
Re:JQuery by corobo on Tuesday April 07, 2015 @11:00AM (#9334489)
That site was not convincing. Why do in 8+ lines what I can do in 1 with jQuery?

Especially when the 8-line version might need testing in every possible browser out there for quirks and bugs. jQuery's already done the legwork there

Edit:

youmightnotnotneedjquery.com linked in a sibling of this comment explains it better in this googledoc

https://docs.google.com/document/d/1LPaPA30bLUB_publLIMF0Rlh...

Re:JQuery by salibhai on Tuesday April 07, 2015 @12:20PM (#9335088)
When performance matters, or you are doing things on an order of magnitude, you may want to skip jquery
Re:JQuery by corobo on Tuesday April 07, 2015 @12:43PM (#9335277)
Do you have any examples or writeups to hand where rewriting jQuery functions ended up in a faster site?

Specifically in cases where other optimizations (caching, beefier servers, faster SQL, SSDs vs HDDs, etc) didn't help more?

Re:JQuery by vorotato on Tuesday April 07, 2015 @01:43PM (#9335713)
Beefing up the server cannot improve client side code. Jquery is quite slow, nice, but quite slow. Sometimes writing out those 8 lines can make your code literally 400 times faster.(source : http://vanilla-js.com/) So yes if performance is a concern, you might want to look at writing it yourself.
Re:JQuery by corobo on Wednesday April 08, 2015 @06:12AM (#9339710)
Very good point, I'd not really considered the lower end spec'd machines, was more thinking overall page load times and the likes. Thanks :)
Re:JQuery by Aldo_MX on Tuesday April 07, 2015 @01:08PM (#9335477)
So if I buy a beefier server, my users with a netbook (ca. 2007) will feel a responsive[1] website?

[1] Responsive as in "Mozilla Firefox is not responding", not as in "Responsive Design".

Re:JQuery by corobo on Wednesday April 08, 2015 @06:12AM (#9339708)
Good point, not well made. Thanks for the response.
Re:JQuery by MatthewWilkes on Tuesday April 07, 2015 @12:40PM (#9335252)
If anything, the examples it gives are persuasive arguments for jQuery.
Re:JQuery by sidcool on Tuesday April 07, 2015 @10:30AM (#9334285)
This is getting out of hand. Remember, an eye for an eye makes the whole world blind.
Re:JQuery by ask5 on Tuesday April 07, 2015 @10:42AM (#9334362)
this mislead me. I thought there was some kind of new jquery release.