JavaScript - - By Kevin Yank

A Belated Word on The JavaScript Anthology

The JavaScript Anthology cover shotSitePoint’s latest title, The JavaScript Anthology, has been out for over two weeks, and I just realized we never mentioned it here on this blog.

<selfpromotion class="blatant">

If you’re serious about JavaScript (or even if you’re serious about getting serious), this really is our sweetest title yet. Granted, I edited the thing, so I’m a little biased, but the fact that I like it even better than my own book should say something. First of all, it’s written by two heavyweights in the world of DOM scripting (née DHTML):

James Edwards, better known as brothercake, is the man behind UDM — the Ultimate Drop Down Menu, which has the distinction of being not only the most cross-browser-compatible hierarchical menu system, but also the most accessible, as it fully complies with the W3C’s Web Content Accessibility Guidelines 1.0.

In the chapters he contributed to the book, James covers a lot of ground: he offers an introduction to JavaScript that focuses mostly on how it can and should be used in modern, best-practice web development, rather than dwelling on mundane details like variables and if-else statements; he gives a remarkably sanguine treatment of frames and pop-up windows, techniques that get a bad rap these days but which, in specific cases, still have a place in the enlightened developer’s toolbox; he takes a fresh look the “old favourite” topic of image preloading, and demonstrates using a progress bar to keep the user informed of what’s going on behind the scenes; and finally he takes a broad look at JavaScript performance–both in terms of how to make it run quickly and efficiently in various browsers (particularly those with problems like memory leaks), and how to make writing and maintaining your code less time consuming.

But by far James’s biggest contribution to the book is in his personal area of expertise: building complex interfaces like drop-down menu systems without compomising accessibility. In the book’s two biggest chapters, James builds from scratch a number of menu systems that offer all the slickness and compatibility of his amazing UDM4 product, and then unflinchingly tackles the accessibility issues that come with such interfaces, ensuring they remain fully accessible to both keyboard-only and screen-reader users. This material alone is, in my opinion, worth the price of admission.

Co-author Cameron Adams, also known as the man in blue brings to the book a strong design sense, as well as a passion for pushing the capabilities of JavaScript to their limits.

In Cameron’s chapters, he introduces the Document Object Model (DOM), and shows how to overcome its annoying limitations; he shows off what I consider the single most elegant way to validate forms prior to submission that I have seen; he delves into all things DHTML, looking at browser compatibility, dynamic modification of CSS, the difference between event handlers and event listeners, and techniques for JavaScript-powered animation; he takes JavaScript to the next level by introducing cutting-edge techniques like AJAX requests, rich text editing, so-called “dropsheet” dialog boxes, and auto-complete fields; and he demonstrates how to manage the masses of code that these techniques can produce, through the use of JavaScript’s object oriented language features… and all with a healthy dose of geeky, pop culture references.

Though somewhat less glamorous, all the basics of (and sneaky tricks for) handling numbers, strings, array, cookies and dates/times are covered in the book as well. At nearly 600 pages, The JavaScript Anthology will give you a complete picture of today’s cutting edge JavaScript techniques. Check out the sample chapters — over 150 pages of free JavaScript goodness.

</selfpromotion>

And now back to our regularly-scheduled blogging.

Sponsors
Login or Create Account to Comment
Login Create Account