JavaScript: The Definitive Guide 5th edition, by David Flanagan, ISBN: 0-596-10199-6

Reviewed by: Robert Boardman, November 2006
Published by: O'Reilly
Requires: N/A; code examples available here
MSRP: US$49.99, CAD$64.99

This is a thick, heavy book—including the index it is only six pages short of a thousand. O'Reilly and David Flanagan first published the definitive guide to JavaScript in 1996. There have been some significant changes since the previous edition. Five new chapters cover advanced topics in client-side scripting for an additional one hundred pages. Material about the Document Object Model (DOM) that was in separate chapters in the fourth edition has now been integrated into the main text because the DOM has been generally accepted.

As with many books about programming languages the first section of the book describes in great detail the pluses, minuses and syntax of the core of JavaScript: lexical structure, data types and values, variables, expressions and operators, statements. These are the basics for understanding the language. The next six chapters are about parts of the core language that are unique to JavaScript and which must be understood in order to fully comprehend the language: objects and arrays, functions, classes and constructors and prototypes for Object Oriented programming, modules and namespaces, pattern matching, and a chapter about using JavaScript with Java. All of this takes a little more than two hundred pages.

The next section is entitled Client-Side JavaScript. This is a comprehensive and detailed collection of material which includes scripting browser windows and documents, using JavaScript with Cascading Style Sheets (CSS), event handling, and working with forms and cookies. Flanagan also offers advanced chapters about Ajax, XML, client-side graphics and using JavaScript with Flash.

>

 

The “back matter” includes a detailed reference about all the classes, methods and properties defined in the core JavaScript language, another reference that focuses on all the objects, properties, functions, methods and event handlers in client-side JavaScript, and a very detailed index.

Flanagan writes well and communicates clearly. He describes enough of the history of JavaScript and browsers to help readers understand the issues involved in using various parts of the language. He assumes readers have only a little knowledge of programming, so it is possible to learn from this book without knowing another programming language. However, a basic understanding of some other programming language would be helpful. For example, at the start of the discussion of arrays Flanagan writes, “An array is an ordered collection of values. Each value is called an element, and each element has a numeric position in the array, known as its index.” That's a concise description, but to be fully understood the explanation demands some foreknowledge of arrays in order to build a mental image of an array and its index. Still, the book is not an introduction to JavaScript but a definitive guide and it seems reasonable to assume such basic knowledge on the part of readers.

As the author states in the preface, the eleven chapters in section two, about client-side scripting, are the meat of the book; the part of the book that most users will refer to again and again. The first section and the reference material will help programmers understand what can go wrong with scripts and why. The examples in section two are well written and clearly explained. All of the scripts are profusely commented. Many of the scripts are generic as well and can be used in a variety of situations. They are not scripts designed specifically for the author's textbook project, so they'll should be of use to many JavaScript programmers.

The author spends time with many scripts explaining why they will not work with some browsers and also gives details about workarounds and other fixes that might apply. The author includes discussion about many popular browsers going back as far as Internet Explorer 4 and Netscape 4. All in all, the book is quite an achievement. This volume will be well used in my library, at least until the next edition comes out. Highly recommended.

KSN Product Rating:

Comments? Questions? Qualms? Technical problems? Send an e-mail!

 

 

 

 




© Copyright 2000-2006 kickstartnews.com. All rights reserved. legal notice
home | previous reviews | hot news | about us | search | store | subscribe

 

Forums Search Home Previous Reviews About Us Store Subscribe