Learning Advanced JavaScript
ejohn.org
ejohn.org
The author's open source projects are quite pedagogical, as well: https://github.com/marijnh/
http://www.ecma-international.org/publications/standards/Ecm...
It will help you understand how the core of the language works. I also keep the Mozilla Javascript Reference:
https://developer.mozilla.org/en/Javascript/Reference
handy for looking things up. For the browser compatibility side:
Complete this, read JavaScript The Good Parts and JS becomes more pleasurable. If you're interested in improving, I highly recommend taking an hour to work through this tutorial in the console.
I also recently found the Crockford videos here: http://developer.yahoo.com/yui/theater/ I watched the first one yesterday. It was a nice intro to what I might call the philosophy of/behind JavaScript, and I'm hoping the others give me a few "aha!" moments about how to design my code.
EDIT: Inheritance Patterns in JavaScript by Michael Bolin:
I read his book because it holds such an authoritative place in JS literature. Last year, I began writing an application which has grown to over 6K lines of JS. At this level, pure JS become unwieldy, IMO. I went looking for a technology to help my code stay organized, optimized, and well documented. Closure Compiler was it. But since I had created my inheritance structure following Crokford's functional methodology, CC wouldn't work with it. Also, the only game in town for documenting JS, is jsDoc, in it's various incarnations. At 7K LOC, I wanted good docs for future developers. jsDoc doesn't work with functional inheritance either, strictly prototypical.
The bottom line for me is: Read the book, for sure, but if you plan on writing a large JS application, and go looking for help from a technology like CC (or maybe even DoJo), beware, that Crokford's recommendations (and they do come authoritatively) might put you in a place where you have to do a lot of refactoring down the road.
TGP will give you a sound understanding of the possible techniques you can employ to form a JS application.
A book on Closure will give you a sound understanding of how to use that specific framework.
TDG, on the other hand, tells you _everything_.
TDG is a reference for the language, DOM implementations (which is a large portion of the book), tools and many aspects of the JS ecosystem.
The Good Parts is concise and elegant; reading and practising it thoroughly will lead to a sound understanding of what makes JS a uniquely powerful language.
Read both, but if you can only manage one make it TGP.
Good tutorial, though and of course still relevant. It would be great if John (or another JSer) would update or add to it.
If I'm in Emacs I might fire up swank-js[1] which lets me interact with standalone JS interpreters like v8 and Rhino, but also contains a server that bridges the gap between the major browsers. Simply open up a web page in Firefox, Safari, Chrome, or Opera and then interact with that browser's JS engine from Emacs.
You get an interactive console, and you get results from all browsers you want to test, immediately.
I've played with node.js a bit, but when I toyed with it it wasn't anywhere near production ready. (This was over a year ago, I might come back to it again sometime soon.)
It allows you to mock up quick examples/bugs/etc.
I find it much cleaner / easier to write and I don't really see a downside to using it instead.