If you want to learn any detail about JavaScript, your first stop is probably Google. With this in mind, the significance of books about JavaScript has fallen, as free Web-based content has grown. However, I’m still of the mindset that there is no better vehicle for learning than a good book that lays out a technology in an easy-to-understand format. There is no better example than Simply JavaScript by Kevin Yank and Cameron Adams.
The audience
There are many books on the market that clearly focus on beginners or concentrate on specific topics for a more advanced audience. Simply JavaScript‘s target audience is the intermediate to advanced Web developer. As an experienced developer with various languages under my belt, I surveyed the book with apprehension, thinking the information would not be relevant to me, but I was pleasantly surprised.
Baby steps
The book begins with a discussion of a three-level approach to Web development: content via HTML, presentation via CSS, and behavior with JavaScript. This approach is the foundation of the authors’ approach to JavaScript that is used throughout the text.
From this point, the basics of JavaScript programming are introduced, and the reader is off and running with the language. An interesting omission that is often found in other books is a language background or history, but this serves no purpose other than filler, so it is nice to see it left out as it focuses on JavaScript development. Here are brief descriptions of the chapters:
- Chapter 1: The role of JavaScript in Web development with its place in the three levels of the Web.
- Chapter 2: The basics of JavaScript programming, including (but not limited to) looping, variable types, arrays, functions, and so forth.
- Chapter 3: The Document Object Model (DOM) is discussed. This is the most important concept for developers to understand when using JavaScript to interact with and manipulate Web pages.
- Chapter 4: JavaScript events are covered in great detail, including a discussion of the history and progression of events and the issues with working with different browsers.
- Chapter 5: Animation via JavaScript and the setTimeout and setInterval methods are covered.
- Chapter 6: Using JavaScript to enhance HTML forms is discussed in great detail including validation, adding menus, and DOM events/properties/events.
- Chapter 7: No developer creates bug free code, so the discussion of errors and debugging is an important chapter. The different types of errors and debugging focuses on using the Firebug tool.
- Chapter 8: There is no hotter concept these days than AJAX. While entire books are devoted to the subject, a good introduction and overview with a focus on JavaScript’s part is covered in this chapter.
- Chapter 9: The final chapter focuses on discussing future possibilities for JavaScript. While it adds little value for hands on development, you may find it interesting to read about what to expect down the road.
- Appendix: The lone appendix provides the details of the JavaScript library used throughout the book. The library is introduced in the first part of the text, but diving into the library code is best placed in this appendix, which the reader can digest and reference when appropriate.
Presentation
Other than the information being presented, the best aspect of this book is its presentation. Complex topics are presented in an orderly fashion in full color. Example code is clearly separated from the text for easy identification, and the tone of the text is easy to follow. The authors have found a way to present a mature technology using a fresh approach.
Plenty of code
The meat of any programming book is the code included in the text. Simply JavaScript excels in this area, as well with small code snippets included when concepts are introduced, and more extensive examples are presented in the latter portion of chapters to drive home the concepts. The authors present quality code with an eye on cross-browser compatibility. The appendix dives into the core library used throughout the text to perform common tasks.
An interesting feature of the book is the discussion of various freely available JavaScript libraries like Dojo, Scriptaculous, jQuery, and the Yahoo! User Interface. Each chapter closes with a discussion of the libraries and how they may be used for various tasks, along with pointing out where a library may fall short. The authors do not appear to favor any particular library but mention them as an option.
Simply JavaScript has something for everyone
Along with various O’Reilly titles, I have recommended this book to both new and experienced developers with an eye on JavaScript. Throughout the text, the authors stress the importance of a firm understanding of JavaScript basics that will be helpful throughout developer interaction with JavaScript. Other than its final chapter, there is no fluff in the book, as concepts are presented, detailed, and coded to demonstrate. It is refreshing to see a book maintain its focus from the beginning to the end. It remains to be seen whether the other offerings from SitePoint provide the same level of quality.
What books or Web sites do you find helpful when dealing with JavaScript or other Web development topics? Share your thoughts and experience with the Web Development community.
Tony Patton began his professional career as an application developer earning Java, VB, Lotus, and XML certifications to bolster his knowledge.
—————————————————————————————
Get weekly development tips in your inbox
Keep your developer skills sharp by signing up for TechRepublic’s free Web Development Zone newsletter, delivered each Tuesday. Automatically subscribe today!