Learning JavaScript

Reviewed by Major Keary

The author of Learning JavaScript observes:

" … Ajax developers have created libraries to make the language look more like Ruby or Python or even Java. However, they've also added all sorts of odd semantics into Ajax applications, with little or no documentation, and obscure references to items such as 'function closures', and so on. … So you have JavaScript books and libraries that are focussed on the old styles of web page development, and new Ajax libraries and books on the new style … ".

Shelley Powers describes JavaScript as two languages in one: the first is a fast, friendly, easy-to-use scripting language built into web browsers and other applications, offering a range of functions; "the second is a mature, full-featured, carefully constrained, object-based language, which does require more in-depth understanding". That is why there is a wide range of JavaScript texts; one does not have to embrace Ajax or other new web technologies to use—or just understand—JavaScript.

Readers are not expected to have programming experience, but are expected to be familiar with HTML/XHTML and CSS, and have a grasp of how web applications work. The book serves as a bridge between the old-style and new-style JavaScript and is especially useful for "those learning JavaScript because they want to jump into Ajax".

Even though the book's primary audience is web designers and programmers, anybody "who wants, or needs, to integrate JavaScript into [a] personal web site or sites … [or] who uses a content-management tool, such as a weblogging tool, and wants to better understand the scripting components … " will find this a comprehensive and detailed introduction. It is not a learning tool for novices.

For those who are serious about learning JavaScript there are questions set at the end of each chapter—answers at the back of the book. Extensive use is made of example code (available for download from a companion website) to illustrate the text; code examples are extensively annotated.

Throughout the book there are useful asides that include tips, suggestions, and general notes amongst which are best practice recommendations such as: Take advantage of short-circuit evaluation by placing the key expression or less resource-intensive expression first when using logical AND/OR operators. There are also boxed items that introduce other programs/tools, such as phpFormGenerator, Eclipse, free JavaScript editors for Windows, and JavaScript compression/obfuscator utilities. In addition to that collection of information there is a chapter that describes a selection of free libraries and frameworks (with URLs).

Learning JavaScript does not pretend to be a definitive guide; however, it is comprehensive and provides discussions of topics that are not found—at least in any useful detail—in most other general JavaScript texts. Security, cookies, and cross-site scripting (XSS) attacks are some of those topics.

Shelley Powers: Learning JavaScript
ISBN 978-0-596-52746-4
Published by O'Reilly, 335 pp., RRP AU$ 55.00

The Australian distributor is Woodslane <www.woodslane.com.au>


Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <img> <li> <ol> <u> <ul> <pre> <br> <blockquote> <hr> <code><sup><sup><p><em><strong> <h2> <cite> <code> <tt> <h1><table><tr><th><td>
  • Lines and paragraphs break automatically.

More information about formatting options

This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 4 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.