|
|
Book Review: JavaScript & DHTML Cookbook |
|
| by Ron Stone |
||
|
Danny Goodman. 2003. Sebastopol, California: O’Reilly & Associates, Inc. [ISBN 0-596-00467-2. 522 pages, including index. $39.95 USD (softcover).] |
||
Overview |
This book is a collection of strategies and methods for web developers who are looking for guidance on creating web page features with JavaScript and Dynamic Hypertext Markup Language (DHTML). An emphasis on scripting best practices provides readers with informative background information for different task situations and browser types. The scripting techniques reflect standards that are interpreted among many recent-version browsers: the World Wide Web Consortium document object model recommendation (W3C DOM) and the ECMA International ECMAScript standards. Attention is also given to a number of special cases such as coding for non-scriptable browsers or for browsers requiring signed scripts. |
|
Structure and Organization |
Fifteen chapters cover a variety of scripting topics frequently used by web developers. Each chapter introduces one or more main topics and then provides a number of “recipes” that can be easily found in the book’s table of contents. The more than 150 recipes in the book are organized as follows.
In addition, browser codes such as “NN4” (Netscape 4) and “IE4” (Internet Explorer 4) are listed at the beginning of each recipe to indicate browser compatibility issues for the given solutions. |
|
Chapter Summaries
|
The first four chapters introduce fundamental JavaScript topics. Some of the recipes from the first chapter on strings include testing the equality of two strings and converting between Unicode values and string characters. A chapter on numbers and dates includes recipes for converting between numbers and strings, formatting numbers for text display, calculating a date value, and validating a date object. Chapter 3 guides readers through recipes for sorting a simple array and sorting an array of objects, among others. Web developers looking for ways to optimize scripts for better error handling and processing speed can find recipes in Chapter 4. Chapters 5 through 8 focus on various browser issues. Chapter 5 lists a variety of strategies for detecting different types of browsers. Methods for setting and positioning a main browser window or creating a new window, with some discussion about judicious uses of pop-up window scripting techniques, can be found in Chapter 6. Chapter 7 elaborates on uses of framesets, including a recipe to keep a web site from being “framed” by another site’s frameset. Chapter 8 discusses methods for scripting dynamic web forms, offering various recipes for form field control and validation. Chapters 9 through 12 concern various means of interactivity: managing events, page navigation techniques, managing style sheets, and visual effects for stationary content. Readers looking for information about DHTML event handlers and events in terms of browser version compatibility will find this information located in the tables provided in Chapter 9. Chapter 10 describes various recipes for script-enhanced navigation, for customizing web pages with user-specific content. The chapter on style sheets offers tips on style sheet selection, and the chapter on visual effects includes recipes for generating rollovers and transition effects. Chapters 13, 14, and 15 describe some topics for writing advanced scripts: positioning HTML elements, creating dynamic content, and dynamic content applications. The book also references a web site and includes three appendices: A. Keyboard Event Character Values; B. Keyboard Key Code Values; and C. ECMAScript Reserved Keywords. The index is a detailed and comprehensive list of the book’s techniques, and includes entries for scripting symbols such as “>=”. |
|
Conclusion |
In brief, the JavaScript & DHTML Cookbook is a useful reference for readers ranging from the casual scripter to the experienced web developer. |
|
|
DMV Home | EBSTC | STC | Contact Us Accentuate
the Positive; Eliminate the Negative | Volunteer
Editing and Writing | Literacy
Project Update |
||