views:

129

answers:

5

Possible Duplicates:
Best resources to learn JavaScript
A Beginners' Guide to Learning JavaScript?

Where to start to learn JavaScript (especially developing node.js+JQuery applications) from zero to expert level (having good C# and some PHP5 experience)? Can you recommend any must-read books and/or cool articles/blogs?

+1  A: 

Javascript: The Good Parts

http://oreilly.com/catalog/9780596517748

Joey Mazzarelli
+1  A: 

A good book on javascript is: Javascript the good parts. A good book on jquery is: JQuery In Action

kgrad
Douglas Crockford's book probably isn't good for beginners.
alex
@alex - He mentioned having C# and PHP experience... I don't think he would have trouble with it.
kgrad
Crockford's book is a weird one. It is probably the best JS book I've read. His arguments for style are important enough that I'd say it should be read by beginners, so they don't go down the path of terrible, global-namespace-polluting garbage so many of us did. But I doubt much of it would make a whole lot of sense to a beginner -- maybe even beginners who grok other high-level languages. But it's a quick read and it's cheap. I'd recommend it, but I wouldn't start with it.
Andrew
A: 

I'd start with w3 schools. Good to begin with.

alex
Sure I've already done this, years ago. I say I've got zero experience, not zero idea of JS.
Ivan
Well, I don't really think w3schools is a good resource, it might *look* good for beginners, but the examples often show [bad practices](http://www.w3schools.com/js/tryit.asp?filename=tryjs_array_for_in) and [utterly wrong concepts](http://www.w3schools.com/jsref/jsref_prototype_array.asp) things that a beginner will not notice, building bad habits and misconceptions from the very beginning...
CMS
@CMS - How is the second link (prototype) a wrong concept? Their example isn't the clearest, but I wouldn't call it wrong. I'm probably missing something here (I almost never use prototype, so I'd say that's likely).
Andrew
@Andrew, the definition is completely wrong, the `prototype` property is only available in function objects, and when you use the `new` operator to create an object from a constructor function, that `prototype` property is used as the `[Prototype]` internal property of the newly created object, building the object prototype chain to implement inheritance... also the example shown is not useful, I don't see why they create a `salary` property initialized with `null` in the `employee.prototype`, a method, that will be shared across many instances would be a much better example...
CMS
@CMS I think those examples would be OK if they stated things like "beware of `x in y` because of prototype chain, use `for`" and "create an array like this is better done like `var array = ['bob', 'tom']`".
alex
+1  A: 

First, I would recommend the Rhino book from O'Reilly to serve as your primary reference book for the language. Second, I would highly suggest you take the time to work with vanilla Javascript before moving on to something like JQuery. Having a good grounding will help you understand what the library is providing you.

CuriousCurmudgeon
I already know JavaScript language itself. But knowing a game rules yet does not imply having any idea of how to win. What I need is guide on practical applied JavaScript engineering, not syntax.
Ivan
Ah. Then Crockford is for you for sure. Another thing you can do is (at first) use jsLint.com religiously for all scripts you write. I don't follow all of the guidelines (and I disagree with several of his styles), but in making your code pass his validation tests, you learn a LOT about why your coding style is wrong and how JS really works.
Andrew
+1  A: 

I started with the Rhino; but then I like to learn from manuals. It's comprehensive and as close to canonical as any source. And you'll need to have it firmly in mind to move into jQuery. Even Douglas Crockford (see Best Parts) recommends it alone.

And then I like the Crockford javascript videos (etc. on YouTube) before jumping into jQuery.

le dorfier