Ismail Elshareef said
I bought this book the day after I attended a session given by Nicholas Zakas (author) at the Velocity Conference in San Jose this year. He offered some brilliant pointers and techniques on writing Javascript code that performs well and is efficient and stable on all browsers.
The book covers all aspects of Javascript in detail and approaches all subjects with an object-oriented mindset. From language basics (data types, variables, objects, functions) and event handling to the Document Object Model (DOM) and the Browser Object Model (BOM) to error handling and debugging to advanced features (custom events, drag and drop) and offline storage just to name a few. He also talks about AJAX, JSON vs. XML and HTML 5 and the new APIs it's bringing. There is also a brief history of language that is written in a much more informative way that in any other book I've read on the subject.
The book puts a lot of emphasis on performance and efficiency, especially when it comes to scope, memory management and algorithm complexity. You will finally learn and understand what closures are all about. You will know how some statements work in some browsers (IE is always the slowest browser.) You will learn a ton of stuff you won't find anywhere else neither online nor in a book.
There is also a section on best practices including maintainability, performance and deployment that I found especially useful.
If you are not a programmer AND just starting to learn Javascript, get Learning JavaScript, 2nd Edition. Otherwise, this is your book. It is essential in any respectable front-end developer's library.
Benjamin Toll said
This is currently my favorite book on JavaScript.
Zakas doesn't pull any punches. It took me a while to work through some of the chapters, primarily Chapter 5 (Reference Types), Chapter 6 (Object-Oriented Programming) and Chapter 18 (Advanced Techniques) because of the difficulty of the material. This is a good thing: the difficulty is due to the sometimes non-intuituve aspects of JavaScript (i.e., function binding and currying), not to any possible failure on the part of the author. His command of his material is evident in his ability to explain these difficult techniques, which can seem overwhelming at first blush. I really like that he doesn't insult his reader's intelligence by sticking with the easier-to-understand aspects of JavaScript but covers the most advanced JavaScript topics thoroughly. I expect to be challenged when reading a book on JavaScript, and taking time to work through the examples by stepping through them in Firebug is well worth it and what I look forward to doing. I don't like when I can read a book and not have to touch a keyboard to understand the material.
I especially love the chapter on OO programming and how he breaks down each OO pattern. He starts with the most basic example of inheritance and works up to the best-case scenario, always giving the pros and cons of each pattern along the way and when each pattern could be employed. In doing so, he provides an invaluable service to those who want to understand how libraries are engineered. I remember when I first was looking at the source code for a particular library, and I was completely baffled by what I saw. For example, I would often see this:
MyClass.superclass.constructor.call(this);
There was no explanation to what this esoteric statement was doing. Now, after reading the book (actually, at the time it was the first edition of the book), I understand that this is known as constructor stealing or object masquerading, and I now know that it's used to inherit instance properties. I had many, many moments like this, and now when I look at source code I can intelligently follow it and understand its intent.
This book empowers the reader with new knowledge. This is especially important when more and more I encounter front-enders who feel that knowing jQuery is knowing JavaScript. I remember when I first began looking at JavaScript libraries I was completely overwhelmed; from that moment I resolved to learn the JavaScript language inside and out if I could. Then, I'd go back to the libraries. Well, that has paid off in spades now, and I feel completely comfortable working in any library knowing what they're doing under the hood (and I have worked with several at different jobs). In fact, I write my own library in my spare time, and I never could have begun to do that or understand how to do that without books like this one and others.
I also love how Zakas gives the back-history to all the subjects he covers. Knowing where stuff came from is important, even if I would never use it. For example, I never knew there were HTML methods, and if I were to have come across them in the legacy code that I support I would've thought that they were user-defined methods. Now I know better. Knowledge is power.
I work on a team composed of Java developers, and this book has helped me to better communicate with them. I love how Zakas talked about how the Array methods can act as data structures. That's very important for a book to cover. Giving comparisons to other languages and emphasizing the similarities and how one language can translate to another is another way that this book has empowered me. It's much easier for me now to convey ideas to my teammates when I can express things like, "JavaScript doesn't have block-level scope like you're used to, but that's what anonymous functions are doing and that's why you see them here...", etc.
Lastly, the expanded chapter on Best Practices is invaluable. I've already employed them in my own work and have gotten the wheels in motion to do what I can at work (gzipping and including compression in our build process).
If you're left a little or a lot puzzled about prototypal inheritance, closures and OO programming in general, get a copy of this book and devote time to it. You'll walk away completely confident that there isn't anything out there that you can't figure out, as I did.
P.S. I suggest reading this book cover-to-cover, even if you feel like that doesn't apply to you. Zakas is very thorough in disseminating lesser-known aspects of both core and client-side JavaScript. In fact, there's so much that I'm going back for a second-helping.
E. Rothchild said
I'm new to Javascript development and this book helped me out right away. It covers many useful techniques with just the right mix of information and code examples. It appears to cover many features so it may be good for intermediate developers too. It also describes differences between browsers and shows how to code to handle the differences.
Jairo G. Molina Jr. said
This is an excellent book about Javascript/ECMA. If you want to learn the language that controls browsers from a programmer perspective, this is the book. Congratulations to the author that took Javascript seriously and wrote this book.
Harold One Feather said
I bought this wonderful book a short while ago, just after the 2nd edition was released. Although I haven't finished it (over halfway through), the author's writing style makes understanding JavaScript easier. I have bought many other books on JavaScript but most follow the copy-and-paste code tutorial style which can be completely confusing for the complete JavaScript beginner such as myself. This book offers simple explanations using concepts that illuminate, rather than befuddle, the nuances and idiosyncrasies inherent in JavaScript. While there are many JavaScript books out there, the roads they follow lead to being just another bookshelf dust collector; this book breaks new trails into expanding your JavaScript skill, actually guiding you on to the golden path to Internet rockstardom!
Comments