JavaScript Coding Standards

About six months ago a few customers asked me about coding standards when writing custom JavaScript using Microsoft’s frameworks… it turned out that we didn’t really have any publicly available standards.

To address this myself and Stuart Leeks set about coordinating and writing some standards to fill this gap. With some highly valuable input, support, and reviews from Stephen Walther, Dave Reed, Boris Rivers-Moore, and Bertrand Le Roy (thanks guys!) we’ve ended up with a set of standards and guidelines that you should find invaluable.

They are targeted at developers using the Ajax Control Toolkit and Microsoft ASP.NET Ajax Library (now part of the Ajax Control Toolkit as per Stephen’s post) but even if you’re using other frameworks you will likely get some value from reading them.

So go check out the Ajax Control Toolkit Coding Standards. To quote the introduction;

The content is split into sections that can be consumed relatively independently, to enable you to get started quickly;

· Naming Standards is simply a set of conventions for naming JavaScript language elements.

· Style Guidelines are preferred ways to structure and format JavaScript code.

· Design Guidelines define recommended practices to create maintainable code.

· Programming Guidelines specifies practices that are beneficial to the JavaScript environment, from a performance, reliability, maintainability, and compatibility point of view.

Enjoy!