Book Review: Learning Javascript
Learning Javascript, by Shelley Powers, O’Reilly, 2006.
This is not a book for beginners. Let me repeat: this is not a book for beginners. Although the Preface states, “Readers of this book should be familiar with web page technology, including CSS and HTML/XHTML … [p]revious programming experience isn’t required, though some sections may require extra review if you have no previous exposure to programming,” there is a strong assumption from the start that the reader at least (a) has some experience with current programming concepts and practices, (b) has some experience with web page coding and practices, or (c) has a lot of time to learn (a) and (b) while working through the book. That said, however, this really is an excellent resource.
I fall into categories (a) and (b) above, but I’m rusty when it comes to javascript, and wanted something of a refresher. Instead, the book had the effect of dropping me into a working laboratory where everything, though nicely explained, remained confusing for quite a way into the book. But by the time the author got to the complex stuff, it all made sense and fell together perfectly, rather like finally understanding how all the tools in that laboratory make everything work so smoothly.
The book seems fast paced, and often left me wishing there were more detailed explanations of some of the examples. But the concepts and examples are interwoven, so just working through the book brought some understanding. The end of each chapter has review questions, with the answers at the end of the book, for those who find that helpful. But what impressed me was that the errata sheet is already available at O’Reilly. There are a few errata, and they’ll be handy to know if you’re trying the examples given in the book. Additional resources are also sprinkled throughout the book which all appear to still be working.
The author’s practical bias comes through very strongly in the book. In the introduction, and throughout the book, there are frequent “best practices.” Paramount to her philosophy of best practices is the admonition, “whatever JavaScript functionality you create, it must not come between your site and your site’s visitors.” Consequently, she often recommends solutions other than javascript to ensure accessibility by all types of browsers and users. There are also good discussions of the issues surrounding using javascript, especially the cross platform issues and what is on the horizon. Because of the browser compatibility issues, the author covers work-arounds each step of the way, with different options and a discussion of what works best and why.
If book titles are supposed to be descriptive of the content, I’m not so sure “Learning Javascript” is the best title for this book, although it fits well if one thinks of it as learning another programming language. You’ll find this book a lot more helpful if your familiarity with web technology includes using CSS and XHTML, or if you have some experience with another programming language.