Hacker News new | ask | show | jobs
by oinksoft 4874 days ago

  In the case of JavaScript libraries virtually everyone has
  standardized upon jQuery at this point.
This guy really lives on his own planet. Maybe most websites that only need to add a small piece of JS functionality are using jQuery, but I seriously doubt that "virtually everyone" writing large JS projects is using jQuery. Google Closure Tools, Sencha/ExtJS, and MooTools remain quite popular, and a host of developers are skipping compatibility layers altogether and only supporting IE9+ and other recent browser versions, particularly those targeting mobile devices.
5 comments

I don't think this is particularly controversial opinion to have at this point: http://trends.builtwith.com/javascript/jQuery http://trends.builtwith.com/javascript
Most websites fall into the former "only need to add a small piece of JS functionality are using jQuery" category. A whole lot of websites include jQuery in default frontend templates and don't even use it on the public-facing website (Drupal, WordPress, other software that has a huge installed base).

Vague deployment statistics mean very little.

I'm not sure what you are saying. That people have jQuery loaded on their websites but aren't using it? If that's your argument, then that's now a wholly separate argument. jQuery having a huge installed base is what we're talking about, and is what John was referring to. Seems like you are changing your stance now that it's fairly obvious your assertion was incorrect in the face of research.
Clearly you have some kind of issue with jQuery but just because you don't like it doesn't make it any less popular, useful or prevalent. Here's a fun drinking game - open up the top 1000 websites and do a shot for each one that uses jQuery. You will be in hospital by about #20 I think.
None of the top five websites use jQuery.

Of the top 20, I've got one fifth of them using jQuery: Amazon, eBay, Wikipedia, and MSN. Not in the hospital yet.

I disagree with your notion that the top 5 sites are a good sample for development trends, but you did miss some uses of jQuery.

Google uses jQuery (and hosts it for millions of sites), just not on their very optimized homepage. They built a very large framework of their own to power their apps, but a lot of their informational sites use jQuery. Here are some examples:

https://developers.google.com http://www.chromeexperiments.com http://developer.android.com

I just checked Amazon, eBay, and MSN they use jQuery.

The only one you listed that doesn't seem to is Wikipedia. You really should actually try the websites before you list them.

You ought to read comments before replying to them. I clearly said that only those four are using jQuery, and that the remaining sixteen do not. I checked all of them by hand before stating this, except for Wikipedia because it is common knowledge that MediaWiki uses jQuery.

Also, your idea below about sniffing for $ is a bit embarrassing. Firefox, Chrome, etc. have come with $ for many years as an ID or query selector, and it has nothing to do with jQuery. Prototype and MooTools also provide $, and probably a dozen or more similar libraries you haven't heard of.

I think Wikipedia removed jQuery due to the impact it had on battery life - see Who Killed My Battery (http://www2012.wwwconference.org/proceedings/proceedings/p41...) for some details.
but still the majority of them do, by a wide margin. I don't even know why you're debating this, it's completely obvious that jQuery has by far the largest mindshare.

edit: ok now I get it, I had a look at your website. You like Closure so jQuery must suck, right? Also I would be in the hospital after 5 shots....

Well, don't provide a test like "you'll be in the hospital by #20" if you haven't vetted the results of it first.

My personal advocacy for the Closure Tools does not discredit my views on other tools, and I'm hoping this ad hominem nonsense doesn't fly in such a forum. Quite a few people come into the IRC channel and are using the Closure Compiler with jQuery and I don't give them shit. I take no issue with you using, liking, preferring jQuery.

You know why I like Closure? Because it makes the hard things possible. When you're talking about JavaScript running the web, it's websites like Gmail that matter the most. And you'd have a hell of a time getting Gmail to run as smoothy as it does using a library like jQuery, or even ExtJS.

Before you insult a poster, please look at what he is actually refuting: that virtually everybody use JQuery.

Virtually everybody is far more than a majority.

No, I think the vast majority of websites really do use jQuery. Certainly, Wordpress uses it, so pretty much every Wordpress blog out there does. I just tried the Spotify homepage- yep- Huffington Post- yep... I think that everyone really has standardised on jQuery unless they're doing something specialised.
I don't think he's living on his own planet, he's actually right - jQuery runs the client side web. Not for everyone but easily 90% of sites (that actually have javascript functionality at all) will use jQuery
Rather, the practice of providing a DOM API compatibility layer runs the web, jQuery being the most widely used library of this sort. When you step out of the god-object API jQuery provides and look at the internals, jQuery, MooTools, and Closure look surprisingly similar. I find the latter to provide the best compatibility (so does Google), but that is another discussion altogether.
Your opinions on what JavaScript libraries provide "the best compatibility" has little bearing on your original statement, that jQuery is not as popular as it actually is.
"jQuery is not as popular as it actually is"

Hmm.

Read as "[...] your original statement that jQuery is not as popular as [I believe] it actually is."
jQuery has a 90% market share[1] among JS libraries so I think it isn't an exaggeration.

[1] http://w3techs.com/technologies/overview/javascript_library/...

But the biggest websites generally don't use 3rd-party JS libraries at all--Google, Yahoo, Facebook, Twitter, etc. all write their own javascript libraries.

Sure there is a long tail of sites that do use jQuery, but most of them don't do very much or get much traffic.

If you look at jQuery's market share by aggregate user sessions or by aggregate time on site across the entire web, it does not look nearly as important.

> Sure there is a long tail of sites that do use jQuery, but most of them don't do very much or get much traffic.

Most sites in general don't get much traffic, but it's absurd to argue that jQuery is not popular amongst large websites. You don't think sites like nytimes.com, craigslist.org, twitter.com (that's right, check the source), live.com, netflix.com and pintrest.com push a lot of traffic? Even more sites use Sizzle, jQuery's selector engine.

Yahoo uses the YUI library
YUI stands for Yahoo User Interface. They wrote it and open-sourced it, like Google with the Closure Library. I wouldn't count it as a third-party library.
Right, it's not 3rd party, but it is included in the statistics that show 90% jQuery market share, and the argument was that the biggest websites are not represented there.
I'm not sure what you're trying to say, but I don't see anybody making that argument in this thread.
twitter uses jquery.
Perhaps he is overstating it a little, given that he's the creator of jQuery.