About IR
Author instructions
Author index
Subject index
Valid XHTML 1.0!

Purcell, L. and Mara, M.J. The ABCs of JavaScript. San Francisco, CA: Sybex, 1997. 456 pp. ISBN 0-7821-1937-9 $29.99
Torok, G., Payne, J., and Westfield, M. JavaScript primer plus: enhancing Web pages with JavaScript programming language. Corte Madera, CA: Waite Group Press, 1996. 588pp. ISBN 1-57169-041-7 $39.99 [With CD-ROM]

These two books have much the same objective: to teach the use of JavaScript, the scripting language that gives HTML-based Web pages interactivity. With Netscape behind it, JavaScript has a great deal going for it as a way of enabling Web-site developers to do some interesting things without having to write dozens of lines of code.

JavaScript is usually described as a scripting language, rather than a programming language: they may best be distinguished by function, in that scripting languages are intended to be used by people without anything in the way of computer science background. They are simpler in syntax and usually allow a smaller range of functions to be performed: Apple's HyperTalk, which was developed for use with the HyperCard application is an example of a scripting language. Both of these books make the point that scripting languages are good starting points for learning the associated programming language, and that, once you are an assured user of JavaScript, you will find moving on to Java a more straightforward matter than would otherwise be the case.

Torok et al. present JavaScript as a programming language and it is also more than 100 pages longer than Purcell and Mara's book and has more text to the page: it deals in greater detail with the various elements of JavaScript with lots of examples (which are also on the accompanying CD). Thus, the sections cover: an introduction to the basics of JavaScript and HTML; programming in JavaScript, covering expressions, controls, objects, events, and other elements of the language, including forms and built-in objects; advanced concepts including the relationship to Java; and, finally, an extended example of a Web page generator and a review of applications. There are also appendices of JavaScript commands and keywords, on-line sources of further information, and an extended example of an on-line spreadsheet. The CD also provides two servers - Alibaba, from Germany, and the Microsoft Internet Server - which requires Windows NT.

The ABCs of JavaScript provides its examples on-line at the Sybex site, rather than on a CD and the book itself is rather less advanced in style, although it deals with a similar range of ideas and also includes a section on the use of server-side JavaScript, which enables, for example, the use of the redirect() function to refer the user from one page or site to another - Torok et al. make no mention of this capability.

The ABCs... is the more basic text, as noted earlier and, instead of proceeding through the various elements of a programming language, demonstrates the features of the language by example in a series of chapters with titles such as: Using names, objects and methods; Adding interactivity to a Web page; JavaScripting your forms, and Working with cookies. It is more a book for the total beginner, whereas some knowledge of programming would enable you to get through Torok et al. rather faster. Like the other book, The ABCs... provides appendices of JavaScript resources, language terms, but also a comparison of the use of JavaScript with Microsoft Explorer and Netscape, and a look ahead at the user of JavaScript with Netscape Communicator.

If you are a complete beginner, The ABCs... is the one to buy, possibly buying Torok et al. when you have mastered the first one. If you have some programming skills already, then you will probably find Torok et al. rather more to your taste.

A.G. Kelly
Institute of Existential Hermeneutics