New Skool DOM Scripting

The Unobtrusive Behavior Layer

Steven G. Chipman

Principal Software Engineer, WAS

Call in: 5-5000, 3193

What's Old?

<a id="link" href="foo.html" onclick="doHighlight(0); return false;" 
	onmouseover="showHideLayer(this,1);" onmouseout="showHideLayer(this,0);" 
	onblur="killHighlight(0);">hello world!</a>
	

Over...and over...and over through the document.

All You Need is Markup

<a id="link" href="foo.html">hello world!</a>
	

What's New, Then?

A best practice technique as well as an overall coding philosophy.

What's it do for me?

This all combines to give us easier to maintain documents that gracefully degrade.

How is it Smaller?

If I Can't do that...

How is it More Semantic?

How is it More Accessible?

Ok...Prove it!

More Proof!

Even More proof!

Transitions are nice...but its the data that's important and ultimately what the user is there for.

Even this!

This presentation software is an example of Unobtrusive Javascript. It is a collaborative work headed up by Eric Meyer called S5.

Go ahead and disable javascript and see what happens.

Resources

Questions?

Thanks for coming! Any questions?