Comments on: Learning jQuery 1.3, the book https://j11y.io/general/learning-jquery-13-the-book/ Sun, 22 Mar 2015 15:39:22 +0000 hourly 1 https://wordpress.org/?v=5.0.13 By: James https://j11y.io/general/learning-jquery-13-the-book/#comment-796 Sat, 04 Apr 2009 01:44:46 +0000 https://j11y.io/?p=711#comment-796 Thanks for the reply Karl.

I guess I agree with you on most of your points. What I meant to put across in my last comment was my belief that learning “pure” JavaScript before its abstractions is a better approach because when a problem occurs you can attribute it to the language itself instead of rummaging down to the lowest level in order to find the cause. I would extend this argument and say that, in an ideal world, JavaScript should be learnt BEFORE the DOM API. While learning two things at once (JS + DOM or JS + jQuery) is a sound method, it might not be ideal.

My argument is purely theoretical, it’s not realistic to expect people to follow this approach where you must start at the lowest level possible and work your way up through the abstractions – plus my argument is flawed, massively, in that it does not allow progress – if everyone constantly programmed in Assembly then we would be living in a different world – it’s because of various programming languages that software engineers can create programs at such speed! It’s because of jQuery and other JS libraries that web designers/developers can create rich and interactive web experiences at such speed…

I’ve gone a bit off track here. I didn’t mean to make a spectacle of that Nettuts tutorial either; it just looked like the perfect way to illustrate a point I wanted to make – being a beginner is fine, but only when you know you’re a beginner! That author was paid money to educate people…

I’ve made this mistake a tonne of times. I look back at articles/tutorials written by me in the past and I cringe at my ignorance, plus I feel a bit guilty for misguiding readers. (heck, I’ll probably look back on this comment right here in a similar manner)

The question of which to learn first, JavaScript or jQuery, is not about necessity, but, I think, it’s about which route will lead to a better understanding of both technologies. Of course “learning them at the same time is perfectly reasonable” but is it the right route to take? If you held all the cards, what decision would you make?

I can’t really argue a strong point here because I’ve only ever been on one side of the river. I picked up JavaScript before I even realized that libraries and frameworks existed so I have quite a limited perspective.

Maybe learning both at the same time would yield impressive results… I don’t know.

]]>
By: Karl Swedberg https://j11y.io/general/learning-jquery-13-the-book/#comment-795 Sat, 04 Apr 2009 00:14:12 +0000 https://j11y.io/?p=711#comment-795 James, please note that I never recommended learning jQuery before JavaScript. I simply suggested that learning them at the same time is perfectly reasonable. And I don’t buy the argument that jQuery or any other JS library will cause you to make more mistakes than pure JavaScript will. Yes, that Nettuts article was unfortunate. But I think the problem lay in the author’s inexperience in general. Lack of plain JavaScript experience was clearly not his only problem. However, whether Nettuts should try to pass off an article by a novice as some sort of authoritative guide is a separate matter.

Sure, “if that author had learnt JavaScript first and knew about the syntax and best practices,” he would have done a better job. He also would have done a better job if he had first learned jQuery and its syntax and best practices before posting the “tutorial.” It isn’t fair to compare someone who is just beginning to learn jQuery with someone who has already learned JavaScript, its syntax, and its best practices. Compare people of equal ability and experience, who are at the same level in their professional development, and let’s see how much better the one is who learns JavaScript first rather than JavaScript and jQuery hand in hand. My hunch is that the difference won’t be as great as you claim.

Before the rise of JS libraries, thousands of web hacks were cranking out the most ridiculously crappy JavaScript you could ever imagine. Some were doing it with DreamWeaver and its MM_swapImage garbage, some were doing it with the help of “DHTML” code snippet sites, and some were doing it all by themselves. But they were all learning JavaScript the old-fashioned way. Even now, lots of people who have never used jQuery are doing if(myVariable == true) {...}. But, hey, beginners make mistakes — lots of them. And that’s okay. As long as they learn from them, and don’t pose as experts.

]]>
By: James https://j11y.io/general/learning-jquery-13-the-book/#comment-794 Thu, 02 Apr 2009 13:03:48 +0000 https://j11y.io/?p=711#comment-794 @eugene, I totally agree. It’s fine for prototyping but when a real working product is required then people that know the technologies inside and out should be the ones to create it.

@karl, thanks for your comment. I am sorry about my misguided accusation about the ‘onload’/’ready’ stuff.

I don’t quite understand your stance on the issue of which technology to learn first. I don’t think it’s okay to start with jQuery because you’ll make tonnes of mistakes that wouldn’t have been made if you knew a little bit about JavaScript. For example, a post at Nettuts was posted today demonstrating how to create a tooltip plugin; I don’t like to point fingers but the author obviously did not start by learning JavaScript. Look at the plugin’s code and you’ll see what I mean. Now, if that author had learnt JavaScript first and knew about the syntax and best practices then he/she would’ve been better prepared when starting to learn jQuery.

How many people that use jQuery everyday know that when they do $(...) they’re actually calling a function that returns a custom jQuery object? How many of them know about scope, closures, lambda, logic operators, the concept of truthy/falsy??

I still see many jQuery’fied designers doing if(myVariable == true) {...}

I’m just saying that learning JavaScript before jQuery is better than the other way around. And no offense to jQuery itself, but it’s not the best platform on which to learn JavaScript – this is inherent of most libraries – they abstract away so much that the user will rarely be exposed to real JavaScript.

]]>
By: Karl Swedberg https://j11y.io/general/learning-jquery-13-the-book/#comment-793 Tue, 31 Mar 2009 18:46:09 +0000 https://j11y.io/?p=711#comment-793 Hi James,

Thanks a lot for the review!

I definitely understand and appreciate your concern about learning a library/framework exclusively rather than combining it with solid fundamental JavaScript concepts. I wouldn’t suggest that someone buy our book in order to avoid learning JavaScript. In addition to the book you mention above, the following books, depending on the person’s background and experience, are also good options: Peter-Paul Koch’s PPK on JavaScript, Douglas Crockford’s JavaScript: The Good Parts, Jeremy Keith’s DOM Scripting, and Stoyan Stefanov’s Object Oriented JavaScript.

While I’m sure I’m in the minority here, I don’t think it’s necessary to learn plain JavaScript before learning jQuery. There’s nothing wrong with learning the two at the same time. Each can enhance understanding of the other. That said, I agree that it would have been nice to have included some preliminary discussion on JavaScript and DOM basics.

I’d like to clarify something that you mention in your post: “Then they continue by saying how you’d have to bind a named function to the event by obtrusively placing it in the HTML.” We don’t actually say that. Instead, we go on to discuss window.onload. We also note:

To be fair, jQuery doesn’t have a monopoly on workarounds to this issue. We can write a JavaScript function that forms a new function that calls the existing onload handler, then calls a passed-in handler. … Browser-specific methods such as document.addEventListener() and document.attachEvent() offer similar functionality, but jQuery allows us to accomplish this task without concerning ourselves with browser inconsistencies.

Thanks again for the review. I’m glad you like the book, despite your misgivings.

]]>
By: eugene https://j11y.io/general/learning-jquery-13-the-book/#comment-792 Tue, 31 Mar 2009 13:32:26 +0000 https://j11y.io/?p=711#comment-792 agreed

i have come across UI designers such as this. this is not a javascript only issue, but flash as well. we do heavy as3/4 data interpolation nonsense, but are put on the same level as animators.

that being said
there is and should be merit for the UI designers getting their hands dirty for such things as rapid prototyping… …but they will soon return to the javascript devs when the heavy lifting is needing to be done.

]]>