To jQuery or not to jQuery?

When I started my set of WebGL tutorials, my JavaScript experience was limited; the largest-scale work I’d done in the language was a couple of demos (the second’s by far the best, let it run for ten seconds) that I did back in 1999, when we called them “DHTML pages“. So, while I have more years’ Java experience than I can shake a stick at, and have been coding increasingly-functional Python since 2005, I really have been learning JS as the tutorials have progressed.

Now, one of the guiding ideas for the tutorials has been that they shouldn’t push you in any particular direction as regards frameworks. The aim has always been to write everything in pure HTML, JavaScript, and WebGL, nothing else. But since late last summer, I’ve been working (in the day job) on a programmable cloud spreadsheet — which, amongst other things, means that my colleagues and I have had to build a pretty large JS codebase for the front-end. And the big take-away lesson from that has been that jQuery rocks.

So, with all the enthusiasm of the newly-converted, and all of the frustration of someone who’s just converted a bunch of 1999 DHTML pages to semi-modern JavaScript, I’ve found myself thinking that I should change the WebGL tutorials here to use jQuery.

What does everyone think? Would jQuery make the tutorials better? Or harder to understand? Should I just stick with pure JavaScript? Or is there a library that’s so much better than jQuery that I’d be crazy not to use it? Have I just inadvertently asked a question that’s going to set off a religious war between devotees of different JS frameworks? Any answers very welcome below.

[UPDATE] I should clarify that I’m only considering rewriting the DOM access and stuff like the onload callbacks using jQuery, and then only to make it easier and more readable. I’d explain the jQuery in as much detail as I currently explain JavaScript. The WebGL and canvas access would remain pure JavaScript.

You can leave a response, or trackback from your own site.

54 Responses to “To jQuery or not to jQuery?”

  1. giles says:

    Well, eventually I decided against it. But JS code is generally shorter and simpler to understand with jQuery, so it *could* have been a good idea.

  2. ivar says:

    Why did you decide against using jQuery?

  3. code[enabled] says:

    I think it’s good to stick with plain JavaScript….tutorials should be given in plain JavaScript instead of favoring certain frameworks – am saying this after a long search for a form that uploads images and then shows the thumbnail of the image to be uploaded. And like every solution i found was like using jQuery – it’s just not right to lean so much on a framework and forget the base that brought us there in the first place.

    jQuery is good though!

Leave a Reply

Subscribe to RSS Feed Follow Learning WebGL on Twitter