Behaviour, Return of Clean HTML
March 9, 2006
As we’ve begun adopting Ajax, JSON, and similar JavaScript heavy technologies a problem quickly arose. Suddenly our clean HTML was being cluttered with tons of script tags, onclicks, and other various event handling functions. Trying to extract this logic back out of the HTML was a definite desire for us.
Enter Behaviour.
Behaviour uses CSS selectors to specify what elements to apply JS handlers to.
Check out these demos. View the source and you’ll see clean markup that is free of logic. This allows us to step back and once again fully separate the presentation layer from the application layer.
Tags: AJAX, behavior, behaviour, css, functions, html, javascript, js, JSON, programming, web, web 2.0, web development, web20, xhtml
Comments
One Response to “Behaviour, Return of Clean HTML”
Got something to say?

[...] In a fully layout separate from logic in an Ajax environment, you need to make use of Javascript event handlers. My personal choice is Behaviour which my friend, Zach, posted about yesterday. [...]