Sunday, December 9, 2007

Excerpt from our JavaScript class, part of the front end group I co-run with my posse at Ascentium.

I am one of Ascentium's rock stars =)
Ascentium
I am a front end dev at Ascentium: working with peers to ensure the quality of our work by learning & teaching best practice in all aspects of front end code. We look at up-to-date methods in CSS, JavaScript and page structure: and teach how to make our sites perform well for SEO, accessibility, page load times, maintainability & the cross-browser experience. We are blessed to be in an organization where many folks from many job roles are fired up about these things.

My experience at Microsoft as a user tester at Expression Web is incredibly useful in this. The Expression team at Microsoft are passionately serious about web standards and ensuring that the web sites of the future will be standards-based, and therefore adhere to the standards brought to the table by the many interest groups that require this. They are an incredibly well-informed and intelligent group of people in the center of the team creating the future of web design.

This blog post is a taste of the type of information that we share in our JavaScript class at Ascentium.

Concepts from Jeremy Keith's fine DOM Scripting book

JavaScript’s History
Netscape enabled JavaScript for the first time in 1995 with Navigator 2.
Microsoft struggled to play catch up, enabling JScript in IE3.
Netscape & Sun worked with the ECMA (the European Computer Manufacturers Association) to standardize the language. The standardized version was called ECMAScript. By 1996, the standardized script was taken up in varying degrees by browser versions 3 and above: the script version is widely known as JavaScript 1.1. The current version of JavaScript is JavaScript 1.6. The W3C encourage browser coders to standardize JavaScript implementations.

Best-practice JavaScript
Degrade gracefully means that the page appears acceptable and behaves in an acceptable manner in older browsers/browsers with incomplete support for the JavaScript functions, or no JavaScript functionality at all. For instance, navigation must not depend on JavaScript.

Backwards compatibility means compatible with older browsers, or browsers with limited or no JavaScript functionality.

Another aspect of best-practice JavaScript scripting is enabling pages to load as quickly as possible. This comes from: externalizing scripts, so that they download once for the entire site (and then are cached by the browser and reused by the pages of the site); and limiting the size of the script by thinking carefully about its syntax.

Jeremy Keith's book