The advantage of scripting languages over the high-powered kind - such as Java and C++ - is that
users don't have to master them from A to Z, but can learn and apply a limited repertoire of code.
JavaScript is such a case; novice web page authors can learn just enough to satisfy their respective needs.
That is not to say that JavaScript is a toy programming language. Quite the contrary: it is a powerful
tool suited to professional-level development of interactive web pages.
Learning JavaScript is not difficult, but it does require more than a casual commitment if one is to
achieve something more useful than simple, Hello World. However, if you come across a web page that does
something interesting, or seems to contain a solution that has eluded you, it is an easy matter to view
and study source code.
JavaScript lends itself to the creation of code modules that can be stored in a library for use as and
when required. Such modules can be mere snippets or substantial slabs of code, and can be either embedded
in an HTML document or called from an external source.
There is a useful body of JavaScript literature that includes books suitable for web novices. They contain
plenty of code examples that can be used as-is or with modification. It is common to find complete
projects used as instructional models that can be adapted to a user's specific needs.
One complaint I have about some of the books is the practice of rendering HTML code in upper case. The
age of case-doesn't-matter is nearing its end and web authors should develop the habit of using lower
case, which is in keeping with emerging standards. There are good reasons for case sensitivity, but that's
another subject for another time.
JavaScript: A Beginner's Guide is a well presented learning resource designed to provide
novice users with JavaScript programming fundamentals, and to open doors to advanced topics such as event
handlers, math and date objects, and forms. No programming experience is assumed, but readers are expected
to be familiar with HTML (but not necessarily expert) and web browsers. However, this is not written in
the light-hearted style of some books designed for beginners. The writing style is clear and technical
subjects are fully explained, but the reader needs to have more than a passing commitment to learning
JavaScript.
It should be mentioned that the book's examples are based on JavaScript version 1.3 and browsers up to
and including MSIE 5.0 and Netscape 4.x. However, that should not deter readers who don't aspire to
professional level web page development. This will show how to do most, if not everything, that will
satisfy the needs of ordinary users.
The author uses a series of tutorials, which he calls modules, that introduce JavaScript, show how it
is placed in HTML files, and then proceed through the real business of putting JavaScript to work.
Topics include: using variables; using functions; JavaScript operators; conditional statements and loops;
event handlers; objects; the document object; the window object; math and date objects; handling strings;
forms; frames; and advanced techniques.
That list may sound daunting to a beginner, but each topic is properly introduced and the reader is taken
step-by-step through the code. Each topic begins with a plain-language definition and explanation of why
the feature is useful.
Within each module are exercises in the form of 'projects', each of which each is accompanied by a margin
reference to a file or files with the solution and which can be downloaded from a companion website. There
are also "1-minute drills" and "mastery checks" that help readers assess their comprehension of the topic.
A valuable aide for anyone who is serious about learning, and understanding, JavaScript.
The depth of coverage is very good; not many texts for beginners deal with the use of regular expressions
at all, let alone in such detail - and so clearly - as the topic is treated here.
John Pollock: JavaScript: A Beginner's Guide
ISBN 0-07-213140-3
Published by Osborne/McGraw-Hill,
603 pp., RRP $54.95 incl. GST |
 |
Learn JavaScript is also a book for beginners, but is designed for users who want a practical
tutorial that takes them straight to basic tasks. The style is largely one of, if you want to do this,
use this script. A continuing project (an "antique bookstore") is used to illustrate each coding
solution, and the relevant files - including the complete bookstore project, can be downloaded from a
companion Web site.
This text does not assume any prior knowledge of JavaScript or programming, and even includes an
introduction to HTML for those who need it.
The book does not stop at basic operations. There is a good chapter on math operators and JavaScript's
math object with examples of application, and a discussion of ActiveX. There is a
description of how to use JavaScript for a slide show - presentations without the need for
PowerPoint.
A selection of chapter headings gives an idea of the topics covered: Image Effects; Document Object Model;
Working with Date and Time; Creating Dynamic Menus; Working with Forms; Adding Plug-ins; and JavaScript
Games.
The companion website contains all the sample code used in the book, and many additional examples.
A well-written tutorial for JavaScript novices. This text does not pretend to be a definitive reference,
but it covers the fundamental information required to create a fully functional website.
Chuck Easttom: Learn JavaScript
ISBN 1-55622-856-2
Published by Wordware,
255 pp., RRP $71.95 incl. GST |
 |
Reprinted from the October 2002 issue of PC Update, the magazine of Melbourne PC User Group, Australia