What to Read to Get Up to Speed in JavaScript
blog.reybango.com
blog.reybango.com
Videos:
* YUI Theater talks by Douglas Crockford: http://developer.yahoo.com/yui/theater/ especially:
* The JavaScript Programming Language
* Advanced JavaScript
Websites:
* "A Re-introduction to JavaScript": https://developer.mozilla.org/en/a_re-introduction_to_javasc...
* Advanced tutorial from John Resig: http://ejohn.org/apps/learn/
* MDC Reference: https://developer.mozilla.org/en/javascript
Books (you can borrow my copies of these if you want):
* "JavaScript: The Good Parts"
* "JavaScript: The Definitive Guide" is a good reference for both the language and browser/DOM APIs
Plus, the book was available before we had all the different resources on the web. I read a few years and rarely refer to it anymore but I especially liked the parts on browser inconsistencies.(my edition is dated now, but served its purpose at the time i bought it)
But seriously, I used JavaScript with abandon years ago and found it laughable then. Crockford's book taught me that JavaScript hasn't changed much in the intervening years - still a hoot as a programming language. You can get just enough done with it if you stay minimal: try to do too much and you'll end up down the creek without a paddle.
FWIW here's a good article that discusses pros and cons of functional JavaScript. http://bolinfest.com/javascript/inheritance.php
My top 3: 1. Eloquent JavaScript 2. JavaScript the Good Parts 3. High Performance JavaScript (see my review: http://carcaddar.blogspot.com/2010/07/book-review-nicholas-c...)
Also, I wouldn't recommend either of Resig's books, despite not reading them. Look at Peter Michaux and David Mark's posts on comp.lang.javascript for criticisms (actually, comp.lang.javascript would be the fourth thing on my list if it was a book).
I did find an encyclopedia's worth of ranting.
Conclusion: don't read Resig's books because two guys who spend a lot of time hating jQuery have criticised the books harshly somewhere on a gigantic website about javascript.
I don't buy that argument. Links please.
http://www.cinsoft.net/mylib.html
Both are experts on JavaScript and while David Mark is controversial, Peter Michaux is not. If he is hating jQuery (and he is not the only one, about 75% of that JSMentors list considers jQuery bad), that must be for a reason. Google for "browser sniffing" vs. "feature detection" to make your own opinion.
http://groups.google.com/group/comp.lang.javascript/msg/37cb...;
If you want to see other criticisms for them, search c.l.j archives on Google Groups (I admit it's not easy ever since Google ruined Groups search).
The thing with jQuery is it's not as simple as "I hate jQuery." The basic idea behind jQuery (selectors) is a great way of doing stream processing over the DOM. This is a really convenient way of working with existing HTML pages.
The main reason David Mark dislikes jQuery is that (at least at the time) it was poorly implemented. Before I ever came across his posts, I tried reading jQuery code and thought it was very hard to understand, but bought the conventional wisdom excuse that JavaScript programming was special because of cross-browser hacks and people like Resig were "ninjas." Then I came across Michaux's code, read Mark's posts, and realized that the "JavaScript ninjas" were really just writing bad code.
But that doesn't change the fact that jQuery is very convenient to use for manipulating existing HTML pages. But there's another problem there - jQuery does stream processing eagerly at run-time. This is extremely inefficient, and there's no reason to do it for pages where you have control over HTML.
A lot of work has gone into caching in jQuery to avoid duplicated selector search, by far the biggest overhead (conceptually, you're doing an exhaustive search over the entire DOM every time you execute a selector).
But that still doesn't address the fact that the results of the selectors are produced eagerly, and processed by every operator eagerly. There are two optimizations that can be made here: map fusion and lazy evaluation. The latter is possible, but would require rewriting jQuery and changing its interface. The former is impossible without a preprocessing step.
But like I said, there's really no reason to even bother using jQuery with pages where you have control over your HTML and can put the objects you need into arrays and hash tables to be there when you need them. That, and the move of web applications to canvas (at this point I'm convinced it's inevitable) make jQuery irrelevant at this point in time IMO.
For what it’s worth, Secrets of the JS Ninjas is one of the most illuminating JavaScript resources I’ve seen anywhere – I don’t know anyone who wasn’t able to learn something from reading it, including skilled, seasoned JS developers, and several of its insights can’t be found anywhere else so far as I know – and it’s at this point still a half-written draft.
You selection is good but I can't believe that in the "if I could only get three" section, Crockford's the good parts is not #1. I mean it is the seminal work for JavaScript, it should be the first or second book anyone considering doing serious JavaScript should read.
For my new job (first out of college) I have read ~5 javascript books cover to cover and flipped through a few more.
Crockford's book was by far the most enlightening and made the most immediate impact on my understanding and methods of coding.
Second, for me, was John Resig's blog (http://ejohn.org/blog)
And third I suppose might be looking through the way people have written things on github:
Appreciate the feedback though and thank you for reading the post.
If you learn client-side JavaScript for use inside the browsers, differentiate what's a language feature and what's part of the DOM.
If you learn server-side JavaScript, start by looking over the CommonJS standards as they tend to be the common denominator across the server-side JS implementations.
And... experiment. Write a .html on your desktop which references a sample.js and use your browser to check it out and modify the code. Don't rely on technical knowledge for more than a couple of hours without trying out the things in practice. Or, for server-side JavaScript, you can get a free hosting account and browser-based editor at http://erbix.com (+), using just OpenId (i.e. your Google account) to sign up.
(+) Disclaimer: I'm affiliated with Erbix.
Yes, it's mine but it's had kudos from folks like Steve Souders and Amy Hoy and almost at 3000 subscribers so I don't feel too bad pimping it. Latest issue is at http://javascriptweekly.com/archive/5.html if you want a preview.
Most of his links seem to point to actual language esoterica. Only 1 seems to really point at DOM interactions.
I think you're right insofar as it's easy to "get going" with JS and see things happen in a web page. But if you're looking to actually learn how to build non-trivial apps, a solid grounding in the language is pretty key.
I think one beginner and one advanced book maybe. True, I did come from a different background than most (having learned both those features in other languages before ever doing javascript), but do you really need 7 more books to tell you about it?
I think the post is bordering on book affiliate spam.
The newer javascript frameworks - the ones that are driving interest in Javascript as a language - are flexing the language features to the point where having good books help. The javascript language is pretty hard and strange when you really start getting in there.
Note that I included a JQuery book in there. Any more, it's not enough to know just Javascript, you should also know JQuery (and just as importantly you should know when to use it and when not to use it)
These are ordered, so the top 3 are the best (in my opinion). The others are really good, but with a topic like this it can easily spin out of control, with hundreds of books getting recommended. Stick to 2-4.
My biggest issue has always been that most books assume you know nothing about programming, and so become boring and repetitive, and I learn nothing new.