News Roundup: Dojo 1.5, Google Style Guide, and Tutorials & Articles
Dojo 1.5 Released
Dojo 1.5 is out, and there’s a heck of a lot of new stuff in this release. In addition to improvements to the core codebase, there are scads of extremely useful feature additions. For instance, Dojo now shows how forward-looking it is with its excellent cross-browser support for HTML5 & CSS3 features, such as CSS animations, local storage, Canvas, among others.
Additionally, the new release has a whole slew of mobile-specific features many of which are geared toward providing native-like experiences in the browser. Once such feature is the inclusion of the TouchScroll library for simulating native scroll mechanics. This is one of the few areas in mobile development where a library is truly necessary, so kudos to Dojo for going that route. Additionally, they’ve provided a stripped-down version of the library to reduce the load time.
The other change I’d like to call out is the improved UI. Form inputs in Dojo widgets now have a standard height, which makes a huge difference. The one-or-two pixel differences you previously saw in some widgets were often annoying, so this is a very welcome improvement. The new Claro theme is also very handsome, if you’re using Dijit.
If you haven’t checked out Dojo, now would be a great time to do so. With this new release, the Dojo team has made the most compelling argument yet that their framework deserves your attention.
Google Javascript Style Guide
Google has done the community a huge favor and published their style guide for Javascript code. This should be a huge boon to any large Javascript project that is looking to standardize on a coding format. In addition to making code more readable and (in my opinion) cosmetically appealing, many of the rules contained in the guide will help you avoid quirks of Javascript interpreters.
Of course, in addition to the formatting rules, there are several recommendations on best practices as well. For instance, the document has a recommendation regarding how to create closures while avoiding memory leaks. And finally, the document closes with a handful of tips on writing idiomatic Javascript, such as using the ternary operator and short-circuit booleans.
All in all, it’s a highly recommended read.
A few articles worth your attention
This week there have been a fair number of compelling articles that are worth a look. I wanted to call out a few here, just in case you missed them.
- Prototypes and Inheritance in JavaScript – One of the central features of Javascript, and also one of the least understood, is the system of prototypal inheritance. More often than not, if this features is used, it’s in an attempt to shoehorn something like classical (Java-like) inheritance into Javascript. In this article, Scott Allen does a great job of introducing the topic of prototypes and makes a good case for adding them to your utility belt.
- 10 Things I Learned from the jQuery Source – Okay, this isn’t from this week, but it’s a great video, and one I can’t believe I haven’t linked to before. In it, the intrepid Paul Irish calls out 10 interesting Javacript techniques he learned by reading the jQuery source. In addition to teaching you some new things about Javascript and jQuery, it’s a great argument for the idea that one of the best ways to learn about the craft of programming is to read other people’s source.
- Redirect caching deep dive – Souders has some sobering news about how bad a job browsers do with caching redirects.












