<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Transcript of the Paris Web 2007 workshop on Unobtrusive JavaScript</title>
	<atom:link href="http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/</link>
	<description>Chris Heilmann - Accessibilty, Web Development and Pragmatism - can talk, will travel</description>
	<pubDate>Sun, 06 Jul 2008 19:52:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Dustin Diaz</title>
		<link>http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6653</link>
		<dc:creator>Dustin Diaz</dc:creator>
		<pubDate>Mon, 03 Dec 2007 10:33:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6653</guid>
		<description>Haha. Apparently adding two -dashes- around phrases adds a strike-thru. Touché</description>
		<content:encoded><![CDATA[<p>Haha. Apparently adding two <del>dashes</del> around phrases adds a strike-thru. Touch&Atilde;&copy;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Diaz</title>
		<link>http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6652</link>
		<dc:creator>Dustin Diaz</dc:creator>
		<pubDate>Mon, 03 Dec 2007 10:32:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6652</guid>
		<description>Yeah, I got that. Simply apply the same technique in the bridge anyhow:

...
var target = e.target;
if ( target.tagName.toLowerCase() == 'a') {
var which = target.href.split('#')[1];
toggle(which); 
}
...

Nevertheless, there was nothing wrong with it to begin with. I just wanted to hi-light parts of your code for the sake of making a point. Your code works, and it conveys good technique - as does mine. You can see how nitpicking practically gets us both nowhere.</description>
		<content:encoded><![CDATA[<p>Yeah, I got that. Simply apply the same technique in the bridge anyhow:</p>
<p>&#8230;<br />
var target = e.target;<br />
if ( target.tagName.toLowerCase() == &#8216;a&#8217;) {<br />
var which = target.href.split(&#8217;#')<sup class="footnote"><a href="#fn1">1</a></sup>;<br />
toggle(which); <br />
}<br />
&#8230;</p>
<p>Nevertheless, there was nothing wrong with it to begin with. I just wanted to hi-light parts of your code for the sake of making a point. Your code works, and it conveys good technique - as does mine. You can see how nitpicking practically gets us both nowhere.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6651</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 03 Dec 2007 10:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6651</guid>
		<description>@Dustin thanks for that. This is a transcript of the workshop and this is the code that new JavaScript developers came up with during the workshop. I deliberately kept everything as we noted it down, rather than making it perfect. 

Your example wouldn't work, as we are using event delegation, so if I click on a LI or the UL it'll try find an href where there isn't any.</description>
		<content:encoded><![CDATA[<p>@Dustin thanks for that. This is a transcript of the workshop and this is the code that new JavaScript developers came up with during the workshop. I deliberately kept everything as we noted it down, rather than making it perfect. </p>
<p>Your example wouldn&#8217;t work, as we are using event delegation, so if I click on a LI or the UL it&#8217;ll try find an href where there isn&#8217;t any.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dustin Diaz</title>
		<link>http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6649</link>
		<dc:creator>Dustin Diaz</dc:creator>
		<pubDate>Mon, 03 Dec 2007 09:01:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6649</guid>
		<description>Chris,
I couldn't help myself after the discussions we were having over on my blog. I had to come and see what was going on over here to get another peek at your world and style of development.

Looking closer at your toggling mechanism to switch out content on the right-hand pane, you might want to consider an alternative approach that uses a bridging technique. You see, you've bound your abstraction to a specific implementation. This is another side of maintenance that wasn't taken into consideration. Try running 'toggle' from the command line, or running it through a unit test (if we are in fact talking about JavaScript for experts).

Try changing your toggle function to take in an argument (instead of an event object). It's binded to a click event callback. Even a simple anonymous function can act as a bridge

(excuse the code if it's mangled, I have no idea what code will look like in your comments.

toc.addEventListener('click', function(e) {
  var which = this.href.split('#')[1];
  toggle(which);
}, false);

function toggle(which) {
  // do stuff...
}</description>
		<content:encoded><![CDATA[<p>Chris,<br />
I couldn&#8217;t help myself after the discussions we were having over on my blog. I had to come and see what was going on over here to get another peek at your world and style of development.</p>
<p>Looking closer at your toggling mechanism to switch out content on the right-hand pane, you might want to consider an alternative approach that uses a bridging technique. You see, you&#8217;ve bound your abstraction to a specific implementation. This is another side of maintenance that wasn&#8217;t taken into consideration. Try running &#8216;toggle&#8217; from the command line, or running it through a unit test (if we are in fact talking about JavaScript for experts).</p>
<p>Try changing your toggle function to take in an argument (instead of an event object). It&#8217;s binded to a click event callback. Even a simple anonymous function can act as a bridge</p>
<p>(excuse the code if it&#8217;s mangled, I have no idea what code will look like in your comments.</p>
<p>toc.addEventListener(&#8217;click&#8217;, function(e) {<br />
  var which = this.href.split(&#8217;#')<sup class="footnote"><a href="#fn1">1</a></sup>;<br />
  toggle(which);<br />
}, false);</p>
<p>function toggle(which) {<br />
  // do stuff&#8230;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jackzheng</title>
		<link>http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6526</link>
		<dc:creator>jackzheng</dc:creator>
		<pubDate>Mon, 26 Nov 2007 04:23:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2007/11/23/transcript-of-the-paris-web-2007-workshop-on-unobtrusive-javascript/#comment-6526</guid>
		<description>thanks you article!</description>
		<content:encoded><![CDATA[<p>thanks you article!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
