
Thomas Fuchs is author of the script.aculo.us user interface JavaScript library, a member of the Prototype core team and a Ruby on Rails core alumnus. As he puts it, ‘You’re using my work every day, even if you’re not aware of it!’ His wife Amy Hoy is a designer, author, and JS programmer in her own right. Together they team to offer a full-day’s training on advanced JS development and deployment techniques that they deliver via chat and videoconferencing software from Vienna, Austria.
Most of the language portion of the training focused on the intricacies of JavaScript objects and functions. One of JavaScript’s greatest strengths (or weaknesses, depending on the viewpoint) is its extreme flexibility. JavaScript is technically a class-free language and while Fuchs and Hoy spent time on some of the ways the language can be manipulated to replicate the classical model, far more attention was devoted to JavaScript’s native prototypal inheritance model and the ways this could be used to modify the language itself. Scope, closure, and reference – all handled somewhat uniquely in JavaScript – were covered. The duo urged us to think in functional and meta (‘code about code’) terms as we programmed, and to code ‘in the positive…’
As the majority of JavaScript deployments today take place within a browser environment, Hoy devoted some time to covering the DOM specification and its implementations in FireFox, IE, and Chrome/Safari. Fuchs then presented on some of the best development practices he’s arrived at for large-scale JS projects. Notably, he advocates splitting projects into files of no more than 100 or so lines for development, then concatenating and minifying only for production. The Sprockets JavaScript preprocessor (available at http://getsprockets.org/) is one tool that can help with this process.
I’ve found it fun and rewarding (if somewhat of a surprise) to be involved in the JavaScript revolution that’s taken place on the web in the past few years. I also don’t think I’m unique in coming to the language from a front-end perspective that traditionally emphasized markup and graphics over programming fundamentals. For a JavaScripter like me, mostly self-taught with five to six years background in the language, the class can offer big value. The sweeping crash course that it is, however, does require an existing grasp of both the syntax and idiosyncrasies of the JavaScript language and object-oriented principles in general. With these in hand, a front-ender on the cusp of becoming a serious programmer learns a lot about the JS language and best code structure and deployment practices from Fuchs and Hoy. Without them, I think s/he’d struggle to keep hold of the tiger’s tail over the course of the eight hours. In short, I recommend the class for others who have spent time on the JavaScript fundamentals and are curious about advanced language topics as well as scalability, deployment, and design pattern programming issues.