Live data from Hacker News

jQuery 3.0 Released

jquery.com

61–70 of 164 posts

Re: jQuery 3.0 Released

#61
post #30

Whenever a new version of jQuery (or Zepto) comes along, I wonder what would have happened if web development borrowed a page from other ecosystems and browser runtimes had subsumed the jQuery API, shipping it natively. It's a controversial notion, I'll grant, but what if the DOM APIs had been replaced by "native" jQuery support? Would we have been better off? Worse? Considering the intricacies of standards bodies an…

That would pretty cool, but one of the biggest reasons jQuery exists is because browsers don't standardize on anything, which makes the idea of native jQuery a bit of a paradox. Another big reason jQuery exists is because standards change. You can use jQuery.ajax without worrying about a change in the XMLHTTPRequest API, because jQuery will support the old and new version until some point where the old version is con…

> browsers don't standardize on anything, which makes the idea of native jQuery a bit of a paradox.

Eh?

Browsers will sometimes implement their own extensions to various standards (which are sometimes incorporated into those standards), but there is certainly a standard DOM API. If you're referring to older versions of IE, they're the ugly ducking, and the situation has since improved dramatically.

jQuery was a great idea back in the day to avoid compatibility headaches, but with modern DOM APIs and CSS3, the only time I personally use jQuery is if my coworkers decide to use it.

https://developer.mozilla.org/en-US/docs/Web/API/Document_Ob...

http://youmightnotneedjquery.com/

Re: jQuery 3.0 Released

#62

Is anybody in the HN crowd still using jQuery for new projects? If yes, why not use "vanilla" js?

I use it. Selectors are great reason. Also the worst traits of Enterprise Java circa 2009-2010 have infested Javascript - so I tend to avoid modern JS frameworks like the plague.

Re: jQuery 3.0 Released

#65

Earlier quoted context omitted.

I'm surprised you are comparing jQuery (a non-trivial additional dependency with reasonable dependency-less alternatives) to printf (a small piece of a dependency you most likely pull in already with).

Isn't it more like comparing jQuery with libc?

libc would be more like the standard DOM specification.

printf is a part of the standard C library.

Re: jQuery 3.0 Released

#66
post #30

Whenever a new version of jQuery (or Zepto) comes along, I wonder what would have happened if web development borrowed a page from other ecosystems and browser runtimes had subsumed the jQuery API, shipping it natively. It's a controversial notion, I'll grant, but what if the DOM APIs had been replaced by "native" jQuery support? Would we have been better off? Worse? Considering the intricacies of standards bodies an…

You must have a short memory; a lot of the really useful bits of the standard DOM API we have now was originally only found in jQuery.

Re: jQuery 3.0 Released

#67

Earlier quoted context omitted.

That would pretty cool, but one of the biggest reasons jQuery exists is because browsers don't standardize on anything, which makes the idea of native jQuery a bit of a paradox. Another big reason jQuery exists is because standards change. You can use jQuery.ajax without worrying about a change in the XMLHTTPRequest API, because jQuery will support the old and new version until some point where the old version is con…

> browsers don't standardize on anything, which makes the idea of native jQuery a bit of a paradox. Eh? Browsers will sometimes implement their own extensions to various standards (which are sometimes incorporated into those standards), but there is certainly a standard DOM API. If you're referring to older versions of IE, they're the ugly ducking, and the situation has since improved dramatically. jQuery was a great…

Moreso at the time JQuery was created than now.

Re: jQuery 3.0 Released

#68
post #53
post #49

Earlier quoted context omitted.

There are ways to do it for sure, but imagine if there was just One Obvious Way To Do It.

Don't get me going on Python in the browser... :)

I can't find a reference but I remember hearing a tale that Guido was contacted by Netscape just before Brendan Eich but wasn't interested. What an interesting parallel reality that conjours up.

Hmmmm. On second thoughts maybe we're be living in a world where Python was as maligned as Javascript.

Re: jQuery 3.0 Released

#69
post #30

Whenever a new version of jQuery (or Zepto) comes along, I wonder what would have happened if web development borrowed a page from other ecosystems and browser runtimes had subsumed the jQuery API, shipping it natively. It's a controversial notion, I'll grant, but what if the DOM APIs had been replaced by "native" jQuery support? Would we have been better off? Worse? Considering the intricacies of standards bodies an…

they have in many ways you can use fetch instead of $.ajax and document.querySelectAll instead of $,

Re: jQuery 3.0 Released

#70

Earlier quoted context omitted.

I'm surprised you are comparing jQuery (a non-trivial additional dependency with reasonable dependency-less alternatives) to printf (a small piece of a dependency you most likely pull in already with).

Isn't it more like comparing jQuery with libc?

It would have been if he said "I'm surprised that there's no youmightnotneedlibc.com".

As soon as you do that though (put the two on equal-ish grounds), you realize it doesn't make much sense and it might as well not have been written in the first place.

Post reply on HN