<?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: Five things to do to a script before handing it over to the next developer</title>
	<atom:link href="http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/</link>
	<description>Chris Heilmann - Accessibility, Web Development and Pragmatism - can talk, will travel</description>
	<pubDate>Mon, 06 Oct 2008 19:20:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Frode Danielsen</title>
		<link>http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7074</link>
		<dc:creator>Frode Danielsen</dc:creator>
		<pubDate>Mon, 11 Feb 2008 02:22:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7074</guid>
		<description>A lot of good tips in this article! I doubt you considered this a perfect and polished example all the way through, mostly a demonstration of the actual tips. But I'd like to point out one thing that caught my eye. Wouldn't it be better to leave out DOM dependencies from the trigger function? I mean, in a larger code base you'd never be 100% sure the link and it's container paragraph would always be the previous sibling of the section div. Maybe the section div had another class, which some other JavaScript hooked up against and also generated a previous sibling of the div, eschewing your paragraph and trigger link.</description>
		<content:encoded><![CDATA[<p>A lot of good tips in this article! I doubt you considered this a perfect and polished example all the way through, mostly a demonstration of the actual tips. But I&#8217;d like to point out one thing that caught my eye. Wouldn&#8217;t it be better to leave out <span class="caps">DOM </span>dependencies from the trigger function? I mean, in a larger code base you&#8217;d never be 100% sure the link and it&#8217;s container paragraph would always be the previous sibling of the section div. Maybe the section div had another class, which some other JavaScript hooked up against and also generated a previous sibling of the div, eschewing your paragraph and trigger link.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan Aquino</title>
		<link>http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7049</link>
		<dc:creator>Jonathan Aquino</dc:creator>
		<pubDate>Sat, 09 Feb 2008 05:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7049</guid>
		<description>I like the tip about signing your work. I read a similar thing in The Pragmatic Programmer.

[Jon Aquino 2008-02-08]</description>
		<content:encoded><![CDATA[<p>I like the tip about signing your work. I read a similar thing in The Pragmatic Programmer.</p>
<p>[Jon Aquino 2008-02-08]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7047</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 09 Feb 2008 00:01:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7047</guid>
		<description>Steve, yes and no, I'd be very careful with truisms and developing with premature optimization. I got contacted by Apple that on the iPhone things might actually look the other way around and I will do some testing of that hypothesis soon. 

To me innerHTML is dangerous for maintenance as it assumes the developer knows HTML as much as the DOM. 

You see it with CMS: you allow people to edit HTML and you will get mismatched tags, deprecated tags and mixing of presentation and structure galore. 

While creating elements with the DOM might be marginally slower it actually leaves you with a trail of what you have done and you can access each element and child you created. It also means your code will be valid and working markup as the browser generates it for you. I've blogged about this here in the past and &lt;a href="/2006/04/18/innerhtml-vs-dom-pot-noodles-vs-real-cooking/" rel="nofollow"&gt;made my points there&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Steve, yes and no, I&#8217;d be very careful with truisms and developing with premature optimization. I got contacted by Apple that on the iPhone things might actually look the other way around and I will do some testing of that hypothesis soon. </p>
<p>To me innerHTML is dangerous for maintenance as it assumes the developer knows <span class="caps">HTML </span>as much as the <span class="caps">DOM. </span></p>
<p>You see it with <span class="caps">CMS</span>: you allow people to edit <span class="caps">HTML </span>and you will get mismatched tags, deprecated tags and mixing of presentation and structure galore. </p>
<p>While creating elements with the <span class="caps">DOM </span>might be marginally slower it actually leaves you with a trail of what you have done and you can access each element and child you created. It also means your code will be valid and working markup as the browser generates it for you. I&#8217;ve blogged about this here in the past and <a href="/2006/04/18/innerhtml-vs-dom-pot-noodles-vs-real-cooking/" rel="nofollow">made my points there</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Streza</title>
		<link>http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7045</link>
		<dc:creator>Steve Streza</dc:creator>
		<pubDate>Fri, 08 Feb 2008 21:43:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7045</guid>
		<description>As a professional JavaScipt developer, I just want to point out that for performance reasons, you should be using innerHTML instead of document.createElement.

http://ajaxian.com/archives/benchmark-dom-vs-innerhtml

Regarding libraries like jQuery, Dojo, etc., please. If you're doing simple little one-off scripts, don't use a library. It slows down your web site load, and can drive traffic away. If you absolutely do need their functionality (like, say, for jQuery's animation), go for it. But something like this is overkill for a framework.</description>
		<content:encoded><![CDATA[<p>As a professional JavaScipt developer, I just want to point out that for performance reasons, you should be using innerHTML instead of document.createElement.</p>
<p><a href="http://ajaxian.com/archives/benchmark-dom-vs-innerhtml" rel="nofollow">http://ajaxian.com/archives/benchmark-dom-vs-innerhtml</a></p>
<p>Regarding libraries like jQuery, Dojo, etc., please. If you&#8217;re doing simple little one-off scripts, don&#8217;t use a library. It slows down your web site load, and can drive traffic away. If you absolutely do need their functionality (like, say, for jQuery&#8217;s animation), go for it. But something like this is overkill for a framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shyam</title>
		<link>http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7043</link>
		<dc:creator>shyam</dc:creator>
		<pubDate>Fri, 08 Feb 2008 21:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.wait-till-i.com/2008/02/07/five-things-to-do-to-a-script-before-handing-it-over-to-the-next-developer/#comment-7043</guid>
		<description>mismatched quotes in line no. 11 on the first code snippet

if(sec.style.display === none'){


*Edit* Good catch, this was actually the Wordpress Textile plugin as it consider === to be an aligned ==. </description>
		<content:encoded><![CDATA[<p>mismatched quotes in line no. 11 on the first code snippet</p>
<p>if(sec.style.display === none&#8217;){</p>
<p><strong>Edit</strong> Good catch, this was actually the Wordpress Textile plugin as it consider = to be an aligned . </p>
]]></content:encoded>
	</item>
</channel>
</rss>
