6 ms·
I would argue jquery has been more instrumental to the success of the web than javascript. It was the stroke of pragmatic genius riding the back of a half-bake
by jdonaldson 11y ago
I would argue jquery has been more instrumental to the success of the web than javascript. It was the stroke of pragmatic genius riding the back of a half-baked language ( a prototype-based language trying to ape the style/name of Java, solely as a cheap cash in of its popularity).
- wambotron 11y agoI don't think that's accurate (or fair, really). Jquery was one in a list of dozens of libraries that did similar things at that time, but ajax/interactivity had been part of the web mindset for years before jquery existed. Jquery just won the library war.
- swang 11y agoYep, I'm surprised jQuery isn't older, as I do recall using dojo and prototype before 2006. jQuery was a huge timesaver, as was dojo, mootools, prototype, etc and not having at least one of these libraries would have sucked. And although jQuery "won" it could have easily been any other javascript library. Even if these libraries somehow didn't exist, there was tons of cross-browser snippets plastered across the web that dealt with most of the common problems (ajax, event listeners, etc).
- gregmac 11y agoWhat drew me to jQuery over Prototype in particular was the fact you could use css-style selectors to get and operate on several elements at once. This often reduced several lines of code in a loop to a couple chained methods. Prototype first came out in Feb 2005. Dojo 0.1 was Aug 2005, and 1.0 (first stable, after a total rewrite) was Nov 2007. I do remember using Prototype with script.aculo.us and thinking it was pretty neat to add some effects to my server-side-created web apps, but that they'd largely stay server side. The first time I saw jQuery, that was when I thought "Yeah, okay, we can actually start building some serious client-side interactions here" instead of just server-generated HTML pages. jQuery took me from hating (but tolerating) javascript to actually enjoying client-side web development.
- underwater 11y agojQuery was important not just because of the feature set, but because it completely dominated the industry. jQuery and its ecosystem of plugins created a single community for JS developers. A lot of subsequent work wouldn't have been as successful without that strong community in place to spread ideas. The other thing it did well was change the thinking about how JavaScript should interact with the DOM. In the past you'd have libraries that made DOM access easier, but they largely followed the same conventions as the underling APIs. jQuery broke from that and completely re-envisioned the API layer. The underlying APIs were treated as an implementation detail; this approach is something that subsequent libraries have adopted too.
- vatotemking 11y agoExactly. Method chaining was a novel feature back then
- deleted 11y ago[deleted]
- rudolf0 11y agoIt won because it has a great API and excellent documentation. jQuery is pretty much the only library or framework made 10+ years ago I can use and still feel like "this is actually well-designed". Frameworks generally obviate the need for it, but if a framework isn't an option and if I'm going to be writing more than 100 lines of code (otherwise I'd suck it up and use plain JS), I always still use jQuery.
- draw_down 11y agoI would give that distinction to XMLHttpRequest. It's why we could have Gmail, Google Maps, etc.
- mikepurvis 11y agoNot really. They used the forever frame, dynamic script tags with jsonp, dynamic <img> tags, and other tricks (at least at the beginning).
- gotchange 11y agoThe weak DOM API not JS was what plagued the early web period from 2000 - 2005.
- frik 11y agoNot weak, but every browser had their own non spec API functions to traverse the DOM in various ways. JQuery offered an easier cross browser API, whereas otherwise one would have to handle various bugs and different API functions.
- kedean 11y agoParticularly events. I think there are technically 3 different ways to create event handlers, one for each of the major js engines of the early 2000's.
- TazeTSchnitzel 11y agoListeners are complicated, but .onclick and friends work everywhere and always have.
- acdha 11y agoFor the simplest cases, yes, but even there you could easily find oddities with things like cancellation, bubbling, timing with regards to other events, support for various element types, etc. Here's a whole list just for click, which is probably the most standardized event handler, and doesn't even go back before the IE5.5 era: http://quirksmode.org/dom/events/click.html http://quirksmode.org/dom/events/click.html
- LoSboccacc 11y agoto double down, touch events on mobile browsers are in a different order than mouse event in regards of onclicks, so that a touchend and mouseup fire at the opposite side of the click event on some mobile browser but not all.
- frik 11y agoAJAX and the Web 2.0 hype around 2005 are responsible for the success of the last few years. There were also YUI, prototype.js, ExtJS before anyone used JQuery. But thanks to the popularity of JQuery around 2010 we got at least two JS functions in HTML5 browsers. And the browsers got more compatible with the HTML spec. Before you had to write for IE, Firefox and Webkit with fallbacks for various bugs. Since around 2013 vanilla Javascript is enough, and JQuery popularity is declining. There are React/Angular/Ember/etc nowadays but hopefully soon ShadowDOM will be supported by most HTML5 browsers.
- jeresig 11y agoJust to clarify: YUI and ExtJS both came out after jQuery, jQuery came out in 2006, and jQuery is actually more popular now than it was a year ago (or in 2010 - see the figures cited in the blog post).
- kgwgk 11y agoNot that this is wrong, but YUI was released less than one month later and had been in use at Yahoo for a few months. http://yuiblog.com/blog/2006/02/13/the-yahoo-user-interface-library/ http://yuiblog.com/blog/2006/02/13/the-yahoo-user-interface-...
- nobleach 11y agoYeah, if you want "older", you need to reach for Dojo or Prototype (with Scriptaculous obviously).
- frik 11y agoWikipedia lists YUI started in 2005, so several months before JQuery. And ExtJS afaik started with prototype.js support and later added JQuery.
- thisishugo 11y agojQuery is a dependency of Ember. Angular (at least 1.x) requires either jQuery or its own subset, jqLite. Cross browser incompatibility is still a thing and jQuery remains a very good tool for abstracting the differences.