Ingredients for success: Solve a common set of problems (browser incompatibilities, ugly API) with a simple, concise interface that maps well to the domain ($(CSS_selector).action(params)) and release under a liberal open source license (MIT). Another library that follows this pattern would be Requests (python).
It's interesting and slightly scary the CDN issue. Several months ago when there was an issue with Google's CDN, an awful lot of websites fell over as they never had a local backup in place.
Hopefully as jQuery usage grows people come to understand the need for fallbacks.
They don't even have to get compromised to mess up the web. Too many sites point their jQuery src to the latest version, so just wait for jQuery 2.0 to come out and see how many IE 6/7/8 users complain. http://blog.jquery.com/2012/06/28/jquery-core-version-1-9-an...
yeah that wouldn't be fun, but maybe we could make a browser add-on to check for the md5 checksum, not a security expert here but sounds like a solution to me
Yes, it does raise the "herd of cloned sheep" question.
But I wouldn't worry too much. It's open source, and using the hosted version means that only that one copy has to be fixed. It is unlikely to ever be a problem on the scope of, e.g., out-of-date Wordpress installs.
I was thinking a cool Chrome extension might be to preload all the major javascript libraries (jquery, etc.) and change any external extension references to the preloaded ones. I'm not sure how much of a speedup this would offer but certainly it would be something.
This is a trend that may actually reverse in the next couple of years. JQuery's popularity has inspired a lot of new DOM API methods now present in modern browsers which are starting to make it somewhat redundant. Once IE8 is out of your support picture the major DOM API normalization issues (events in particular) are out of the way.
The only reason I can think of to use JQuery beyond that is that it's a dependency for a lot of libraries you use, you're supporting something other than Android/iOS on mobile or you really, really like the extras like animate, their powerful event system, extend and/or their ajax methods.
That said, it's popularized a lot of useful coding methods, showed everybody how normalization should be done, and demonstrated the power of closures/factory functions to keep objects very light-weight in spite of having a ton of functionality associated with them. It's not just for client-side-illiterate noobs. Studying JQ under the hood can teach a lot about JQ.
The newer JS libraries/frameworks/tools are concerning themselves more with how to implement highly complex UI in an app-maintainable way.
IE6 was released in 2001 and while it's finally on it's way out, you will run into people who want it supported.
So by next couple of years, do you mean 10 years after IE8 was released which would be 2018 we'll begin to see support for it dropping?
jQuery serves the exact purpose of allowing you to push your design forward without burning as much time supporting inconsistency. I believe jQuery defers to built in browser implementations when they are better or compatible so you still don't loose anything by using jQuery
That would prevent you from using the latest version in older browsers.
Perhaps if it was implemented as a resource="jquery-1.8.0" attribute on the script tag, allowing browsers with a copy to load that instead of hitting the server.
If Sizzle is present in over half of all websites, it's already a standard and one would expect either Mozilla or Google to add native support for it; it seems like low-hanging fruit.
As much as I love jQuery, I feel it can quickly become a crutch, particularly for those who have spent a fair bit of time relying on features like .animate(). Modern browsers often have alternatives that (depending on the situation) simplify your code and offer significantly better performance. Similarly, I cringe whenever I see jQuery UI pop up in an interface - while it's easy to use, it also keeps some from developing UI features of their own.
There's a time and place for everything, and as a whole, I feel many are over-relying on jQuery.
You're right. But the fact that jQuery has a much simpler API than using just javascript makes it easier for programmers to use it. It's a library and that's what libraries are for, it takes care of notorious cross browser compatibility issues (how well is another question..)
jQuery UI similarly helps implement features such as autocomplete, etc. which while you could take the time to implement again offers a simpler API with cross browser tested code.
I don't think there's any argument against the fact that jQuery has definitely made a massive impact on the use of javascript on the web. There are plenty of programmers who wouldn't touch javascript with a 10 foot pole before jQuery due to the cross browser issues. I think that's actually been a good thing for UI for the most part.
[+] [-] postfuturist|13 years ago|reply
[+] [-] nthitz|13 years ago|reply
[+] [-] digitalclubb|13 years ago|reply
Hopefully as jQuery usage grows people come to understand the need for fallbacks.
[+] [-] hnruss|13 years ago|reply
[+] [-] mrpollo|13 years ago|reply
[+] [-] grayj|13 years ago|reply
But I wouldn't worry too much. It's open source, and using the hosted version means that only that one copy has to be fixed. It is unlikely to ever be a problem on the scope of, e.g., out-of-date Wordpress installs.
[+] [-] keltex|13 years ago|reply
[+] [-] Pherdnut|13 years ago|reply
The only reason I can think of to use JQuery beyond that is that it's a dependency for a lot of libraries you use, you're supporting something other than Android/iOS on mobile or you really, really like the extras like animate, their powerful event system, extend and/or their ajax methods.
That said, it's popularized a lot of useful coding methods, showed everybody how normalization should be done, and demonstrated the power of closures/factory functions to keep objects very light-weight in spite of having a ton of functionality associated with them. It's not just for client-side-illiterate noobs. Studying JQ under the hood can teach a lot about JQ.
The newer JS libraries/frameworks/tools are concerning themselves more with how to implement highly complex UI in an app-maintainable way.
[+] [-] willtheperson|13 years ago|reply
IE6 was released in 2001 and while it's finally on it's way out, you will run into people who want it supported.
So by next couple of years, do you mean 10 years after IE8 was released which would be 2018 we'll begin to see support for it dropping?
jQuery serves the exact purpose of allowing you to push your design forward without burning as much time supporting inconsistency. I believe jQuery defers to built in browser implementations when they are better or compatible so you still don't loose anything by using jQuery
[+] [-] jpkeisala|13 years ago|reply
[+] [-] podperson|13 years ago|reply
<node>.querySelector(...) and <node>.querySelectorAll(...)
If all you're using jQuery for is grabbing nodes from the DOM and attaching event listeners AND you don't care about old versions of IE then...
http://caniuse.com/queryselector
In a nut: querySelector[All] requires IE8, addEventListener requires IE9.
[+] [-] simonbrown|13 years ago|reply
Perhaps if it was implemented as a resource="jquery-1.8.0" attribute on the script tag, allowing browsers with a copy to load that instead of hitting the server.
[+] [-] politician|13 years ago|reply
[+] [-] emehrkay|13 years ago|reply
[+] [-] unknown|13 years ago|reply
[deleted]
[+] [-] zalew|13 years ago|reply
sad
[+] [-] jvdongen|13 years ago|reply
[+] [-] rthprog|13 years ago|reply
There's a time and place for everything, and as a whole, I feel many are over-relying on jQuery.
[+] [-] ashray|13 years ago|reply
jQuery UI similarly helps implement features such as autocomplete, etc. which while you could take the time to implement again offers a simpler API with cross browser tested code.
I don't think there's any argument against the fact that jQuery has definitely made a massive impact on the use of javascript on the web. There are plenty of programmers who wouldn't touch javascript with a 10 foot pole before jQuery due to the cross browser issues. I think that's actually been a good thing for UI for the most part.
Can it be done faster and better ? Yes.
Can it be done cheaper ? Probably no.
[+] [-] tcarnell|13 years ago|reply
[+] [-] sreyaNotfilc|13 years ago|reply
[+] [-] adrianwaj|13 years ago|reply
[+] [-] zerop|13 years ago|reply
[+] [-] ojr|13 years ago|reply
[+] [-] unknown|13 years ago|reply
[deleted]