skip to content rich footer

stevenclark.com.au

subscibe to the StevenClark.com.au rss feed

Progressive Enhancement with JavaScript

In this month’s A List Apart Aaron Gustafson concluded his trilogy of posts about progressive enhancement techniques. His first installment was Understanding Progressive Enhancement (issue no. 269) where he discussed the subtle difference between progressive enhancement and graceful degradation with the diagramatic analogy of the separation of layers (content, presentation and client-side scripting) as a peanut M&M. In his second installment Progressive Enhancment with CSS (issue no. 270) Aaron explained how to organise your stylesheets and how to deal with Internet Explorer 6.

Progressive Enhancement with JavaScript (issue No. 271) explains the intelligent approach to including JavaScript in your work. Not as a fix all kludge but as something which gracefully enhances your website for users who have the browser support while not impacting those users with outdated browsers. He briefly explains the basic strategy of placing your JavaScript into external files and writing unobtrusively, as well as the need for maintaining style separation.

In nearly every experience on teams where I’ve been involved, or even entered the conversation, these concepts have failed to be fully grasped. And they need to be grasped. Managers need to ditch the myth of pixel perfection across browsers and devices in favour of setting an acceptable baseline that enables users to access websites, then provide progressively enhanced features that can improve the experience for those with browsers that can handle it. The trick is ensuring that data is available at the baseline level rather than writing it in with your scripts. Does the baseline case work? Does it work without throwing errors?

Because used wisely and proficiently JavaScript is an empowering language for the web development behaviour layer. Used wildly it’s the bane of users and site maintainers far and wide. The difference between class and arse, so to speak. Excellent series from Aaron that needs to be carved into hardwood and bonked on the heads of certain managers and acedemics repeatedly (with a soft cushion perhaps).

You could understand your website as a scone which by itself and straight out of the oven might be oh so yummy! But you could enhance that with butter if you weren’t lactose intolerant and jam if you weren’t diabetic. So you can hand out scones quite freely as your baseline while those with knives and lactose tolerance can enjoy buttered scones and so forth. Does that make sense? As long as everyone gets the scone then you’ve provided a valuable service. What you need to avoid is depriving a lactose intolerant person of the scone simply because they don’t have a knife or can’t swallow the enhancement.

JavaScript, like a gun, doesn’t set out to harm anyone. The power is in the hand of the JavaScripter to appreciate the technology at hand and use it with discretion.

baseline scone with enabler knife and progressive enhancements of butter and jam

Comments are closed.

Social Networking

Keep an eye out for me on Twitter

About the Author

Steven Clark Steven Clark - the stand up guy on this site

My name is Steven Clark (aka nortypig) and my passions are business, web development, photography and writing. I have an MBA (Specialisation) and a Bachelor of Computing from the University of Tasmania. I am working as a business management consultant.

Photography

My photography is at Steven Clark Studio and my regular photo blog presents an ongoing stream of latest images at Walk a Mile in my Shoes and I'm working on a long-term photography project called the King Island Project.

Recently Reviewed Books

Site Supporters

Hosted by Brett Drinkwater at Tashosting who is always there at the other end of my every inconvenient question and technical crisis. Brett's local community support for us over the last five years is greatly appreciated.

skip to top of page

Currently Reading

Ansel Adams: The Camera

As the first of three parts of Ansel Adams Photography Series, Ansel Adams: The Camera begins by discussing the idea of visualisation in relation to photography. Ansel Adams is a master of his craft; this series has sat on my backburner for some time. Book 2 in this series is The Negative and it's followed up by The Print. In them Ansel outlines his philosophy of photography rather than trying to lay down a set of rules. This first instalment is a technical book that explains the good old fashion film camera.