Professional Javascript for Web Developers

Professional Javascript for Web Developers is a comprehensive 800+ page tome that does a deep dive on all things Javascript.     It starts off with a brief history of the ECMAScript standard that Javascript is derived from, before launching into the basics, teaching everything there is to know about types, statements, operators and functions.    These earlier chapters provide a solid basis of understanding that the later parts of the book then build off of.   These sections go into the more advanced language features such as function expressions, closures, prototypes, and inheritance.    In addition, the book also devotes entire chapters to the typical day to day tasks that web developers do on a regular basis: DOM manipulation, forms, AJAX, JSON, and event handling.   Along the way, it manages to cover just about everything else as well, including client detection, XPath, XSLT, and the WebStorage API.   Heck, it even covers 3D graphics programming with WebGL!

When I say the book does a deep dive, I do mean deep.   I had originally intended to skim through the language basics sections, but ended up learning a lot about the various nuances and caveats of Javascript.     For example, due to the dynamically typed nature of the language, there are a lot of “gotchas” involved when using the equality and comparison operators.    This book covers all of them.  While reading the section on variables, I was surprised to learn that all function arguments are passed by value, whereas creating a copy of a reference type (eg var obj1 = new Object(); var obj2 = obj1) merely creates a pointer to the original object on the heap.     Useful information such as this is found throughout the book, and upon completing it, I found myself with a greater appreciation and understanding of the language.

I also gained a greater appreciation of just what a pain in the ass it is to support multiple browsers.    The slight differences in Javascript implementations across browsers (or not so slight, in the case of IE) can be quite problematic for front end developers, so the book takes great pains to discuss techniques to writing cross-browser compatible code.   To that end it spends an entire chapter talking about client detection; the sample code from this chapter is used extensively throughout the later portions of the book.

All in all, I would strongly recommend this book to anybody who is a front end web developer.   The breadth of topics covered makes it a great reference, whereas the depth makes this an excellent textbook as well.   Particularly valuable are the best practices found throughout every chapter.   That in and of itself is reason enough to own this book.   As an added bonus, it is quite funny learning about all the errors in earlier versions of IE’s Javascript engines that were either egregious bugs or blatant disregard for the official standards.

Leave a Reply

Your email address will not be published. Required fields are marked *