<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Graft: Making Javascript DOM a Piece of Cake</title>
	<atom:link href="http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: JavaScript DOM - einfach mit &#34;graft()&#34; - jswelt - Forum (Javascript, PHP, MySQL, AJAX, Webdesign)</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-153301</link>
		<dc:creator>JavaScript DOM - einfach mit &#34;graft()&#34; - jswelt - Forum (Javascript, PHP, MySQL, AJAX, Webdesign)</dc:creator>
		<pubDate>Sun, 29 Oct 2006 21:05:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-153301</guid>
		<description>[...] AW: JavaScript DOM - einfach mit &quot;graft()&quot; -  Heute, 23:05       Die Jungs von Ajaxian haben auch ein Feature davon: Ajaxian » Graft: Making Javascript DOM a Piece of Cake      check mein weblog [...]</description>
		<content:encoded><![CDATA[<p>[...] AW: JavaScript DOM &#8211; einfach mit &quot;graft()&quot; &#8211;  Heute, 23:05       Die Jungs von Ajaxian haben auch ein Feature davon: Ajaxian » Graft: Making Javascript DOM a Piece of Cake      check mein weblog [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugo Wetterberg</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-136782</link>
		<dc:creator>Hugo Wetterberg</dc:creator>
		<pubDate>Thu, 19 Oct 2006 08:57:38 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-136782</guid>
		<description>Ah, well, Roy I really disagree with you, there is no reason to go through Concatenation Hell everytime content is generated. But the route that Scott is also a viable one in many situations.</description>
		<content:encoded><![CDATA[<p>Ah, well, Roy I really disagree with you, there is no reason to go through Concatenation Hell everytime content is generated. But the route that Scott is also a viable one in many situations.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graft method on Ajaxian &#187; Blog Archive &#187; Good Old Tech</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-136751</link>
		<dc:creator>Graft method on Ajaxian &#187; Blog Archive &#187; Good Old Tech</dc:creator>
		<pubDate>Thu, 19 Oct 2006 08:26:46 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-136751</guid>
		<description>[...] Ajaxian.com has made a post about a method by schadenfreunde with the rather brutal-sounding name &#8220;graft&#8221;, makes me think of skin grafts and other such generally unpleasant things, but maybe that&#8217;s just me. [...]</description>
		<content:encoded><![CDATA[<p>[...] Ajaxian.com has made a post about a method by schadenfreunde with the rather brutal-sounding name &#8220;graft&#8221;, makes me think of skin grafts and other such generally unpleasant things, but maybe that&#8217;s just me. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roy</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-136643</link>
		<dc:creator>Roy</dc:creator>
		<pubDate>Thu, 19 Oct 2006 06:14:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-136643</guid>
		<description>Well I agree that web standards zealots will wet their pants for this.
This is like their wet dreams come true.

As for me, I will stick to my quick and nimble InnerHTML.
I agree with Scott that anything that involves creating a whole chunk of HTML using JS is just ridiculous. I&#039;ve been through that to fit in to the web standards crowd and to impress geeks, it wasn&#039;t long before I dumped it and said &quot;Screw it. I wanna get real Yo!!! &quot;.</description>
		<content:encoded><![CDATA[<p>Well I agree that web standards zealots will wet their pants for this.<br />
This is like their wet dreams come true.</p>
<p>As for me, I will stick to my quick and nimble InnerHTML.<br />
I agree with Scott that anything that involves creating a whole chunk of HTML using JS is just ridiculous. I&#8217;ve been through that to fit in to the web standards crowd and to impress geeks, it wasn&#8217;t long before I dumped it and said &#8220;Screw it. I wanna get real Yo!!! &#8220;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Foster</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-136488</link>
		<dc:creator>Sam Foster</dc:creator>
		<pubDate>Thu, 19 Oct 2006 03:55:36 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-136488</guid>
		<description>@carmen - if you&#039;re writing your JSON by hand and worrying about escape characters I think you&#039;ve missed the point. 
 
 I can see the utility of this kind of thing if you didn&#039;t want to import a whole library just to get scriptaculous&#039; Builder.node, or dojo&#039;s widget templates, or whatever... Trouble is, by the time you&#039;ve figured out you&#039;ve got memory leaks, need a good way to hook up event handlers, need some fx to notify your users of the change and so on .. well it turns out you do need the whole library after all.</description>
		<content:encoded><![CDATA[<p>@carmen &#8211; if you&#8217;re writing your JSON by hand and worrying about escape characters I think you&#8217;ve missed the point. </p>
<p> I can see the utility of this kind of thing if you didn&#8217;t want to import a whole library just to get scriptaculous&#8217; Builder.node, or dojo&#8217;s widget templates, or whatever&#8230; Trouble is, by the time you&#8217;ve figured out you&#8217;ve got memory leaks, need a good way to hook up event handlers, need some fx to notify your users of the change and so on .. well it turns out you do need the whole library after all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Geary</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-136379</link>
		<dc:creator>Michael Geary</dc:creator>
		<pubDate>Thu, 19 Oct 2006 01:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-136379</guid>
		<description>And here&#039;s &lt;a href=&quot;http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype#comment-176&quot; rel=&quot;nofollow&quot;&gt;yet another version&lt;/a&gt; of the same thing, also from a few months ago (actually two more versions). :-)</description>
		<content:encoded><![CDATA[<p>And here&#8217;s <a href="http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype#comment-176" rel="nofollow">yet another version</a> of the same thing, also from a few months ago (actually two more versions). :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carmen</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-136376</link>
		<dc:creator>carmen</dc:creator>
		<pubDate>Thu, 19 Oct 2006 01:22:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-136376</guid>
		<description>my markaby sensibilities are appalled at this ugly code. of course its not as ugly as JSON with all that weirdo escaping..</description>
		<content:encoded><![CDATA[<p>my markaby sensibilities are appalled at this ugly code. of course its not as ugly as JSON with all that weirdo escaping..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jacob</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-135628</link>
		<dc:creator>Jacob</dc:creator>
		<pubDate>Wed, 18 Oct 2006 19:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-135628</guid>
		<description>I like &lt;a href=&quot;http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/&quot; rel=&quot;nofollow&quot;&gt;Jack&#039;s YUI-ext&lt;/a&gt; MUCH better for this stuff, performance numbers included.</description>
		<content:encoded><![CDATA[<p>I like <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/" rel="nofollow">Jack&#8217;s YUI-ext</a> MUCH better for this stuff, performance numbers included.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Mularien</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-135451</link>
		<dc:creator>Peter Mularien</dc:creator>
		<pubDate>Wed, 18 Oct 2006 16:48:37 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-135451</guid>
		<description>FWIW, &lt;a href=&quot;http://mochikit.com/doc/html/MochiKit/DOM.html&quot; rel=&quot;nofollow&quot;&gt;MochiKit&lt;/a&gt; has had functionality that looks very similar to this for quite a while, although IMHO the MochiKit syntax is cleaner.</description>
		<content:encoded><![CDATA[<p>FWIW, <a href="http://mochikit.com/doc/html/MochiKit/DOM.html" rel="nofollow">MochiKit</a> has had functionality that looks very similar to this for quite a while, although IMHO the MochiKit syntax is cleaner.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Kuhnert</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-135438</link>
		<dc:creator>Jesse Kuhnert</dc:creator>
		<pubDate>Wed, 18 Oct 2006 16:32:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-135438</guid>
		<description>Yes well, it certainly does look like &quot;a piece&quot; of something.. ;)</description>
		<content:encoded><![CDATA[<p>Yes well, it certainly does look like &#8220;a piece&#8221; of something.. ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Kahn</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-135432</link>
		<dc:creator>Mark Kahn</dc:creator>
		<pubDate>Wed, 18 Oct 2006 16:25:11 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-135432</guid>
		<description>What is the difference between this and the more or less exact same thing posted oh 6 months ago?

My own version (demo): http://www.jslibrary.org/snips/domcreate.asp</description>
		<content:encoded><![CDATA[<p>What is the difference between this and the more or less exact same thing posted oh 6 months ago?</p>
<p>My own version (demo): <a href="http://www.jslibrary.org/snips/domcreate.asp" rel="nofollow">http://www.jslibrary.org/snips/domcreate.asp</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Schiller</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-135414</link>
		<dc:creator>Scott Schiller</dc:creator>
		<pubDate>Wed, 18 Oct 2006 16:15:00 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-135414</guid>
		<description>There seems to be an obsession with creating HTML in Javascript these days! :) - It&#039;s not terribly flexible, nor clean, in my opinion.

I&#039;d suggest cloning an existing template of nodes (ie. a markup structure as in the above code example) from HTML, and then modifying it with JS.

eg.
var template = document.getElementById(&#039;mytemplate&#039;).cloneNode(true);
// (modify CSS classes etc. here to adjust style, insert &quot;specific&quot; strings, content etc. but don&#039;t create DOM structure..)
graft(document.getElementById(&#039;mycontentdiv&#039;),template);

Trying to create any sort of relatively-complex HTML/DOM structure using javascript goes against the whole point of HTML, in my opinion. Instead, build a template in HTML and then copy/clone it and modify minimally using JS! (There&#039;s a related discussion on the post before this comparing JS DOM/innerHTML also.)</description>
		<content:encoded><![CDATA[<p>There seems to be an obsession with creating HTML in Javascript these days! :) &#8211; It&#8217;s not terribly flexible, nor clean, in my opinion.</p>
<p>I&#8217;d suggest cloning an existing template of nodes (ie. a markup structure as in the above code example) from HTML, and then modifying it with JS.</p>
<p>eg.<br />
var template = document.getElementById(&#8216;mytemplate&#8217;).cloneNode(true);<br />
// (modify CSS classes etc. here to adjust style, insert &#8220;specific&#8221; strings, content etc. but don&#8217;t create DOM structure..)<br />
graft(document.getElementById(&#8216;mycontentdiv&#8217;),template);</p>
<p>Trying to create any sort of relatively-complex HTML/DOM structure using javascript goes against the whole point of HTML, in my opinion. Instead, build a template in HTML and then copy/clone it and modify minimally using JS! (There&#8217;s a related discussion on the post before this comparing JS DOM/innerHTML also.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Laurens van den Oever</title>
		<link>http://ajaxian.com/archives/graft-making-javascript-dom-a-piece-of-cake/comment-page-1#comment-135400</link>
		<dc:creator>Laurens van den Oever</dc:creator>
		<pubDate>Wed, 18 Oct 2006 15:58:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=1696#comment-135400</guid>
		<description>From the previous article:

&quot;The results show that innerHTML is king for all browsers:&quot;

So what is the use of graft() over innerHTML?</description>
		<content:encoded><![CDATA[<p>From the previous article:</p>
<p>&#8220;The results show that innerHTML is king for all browsers:&#8221;</p>
<p>So what is the use of graft() over innerHTML?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

