JavaScript:The Definitive Guide, 5th Edition
This has been my JavaScript reference of choice since the fourth edition. A few months ago, I noticed that the fifth edition had been published (back in August of 2006; better late than never, I guess).
I won’t go into too many details about what’s new in the fifth edition (if you want them, they are on Flanagan’s web site). The changes include expanded discussion of JavaScript functions and classes, techniques used to implement namespaces, how to use Ajax (i.e. XMLHttpRequest), and work with XML documents. There is also a lot of talk about how to use JavaScript with Flash and Java, but I skimmed those chapters (since they didn’t really interest me). All in all, there is about 234 pages of new/updated content.
The only stuff I hadn’t seen or read elsewhere were the namespace techniques and how to work with XML documents. However, the chapter on classes is the best discussion of the topic I’ve seen. If you need to understand a lot of the techniques that you’ll see in the wild in libraries like Prototype or Script.aculo.us, Flanagan provides that foundation.
Most of what I read consisted of about 50% code samples. Flanagan does a good job of explaining a concept and then implementing it in actual code. In addition, the last half of the book includes a thorough core and client-side JavaScript reference.
