<?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: Magic DOM</title>
	<atom:link href="http://ajaxian.com/archives/magic-dom/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/magic-dom</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: ta</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-252081</link>
		<dc:creator>ta</dc:creator>
		<pubDate>Wed, 27 Jun 2007 21:48:48 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-252081</guid>
		<description>Anyone tested this with the input element?
Just found that IE does not write the name attribute when created in runtime</description>
		<content:encoded><![CDATA[<p>Anyone tested this with the input element?<br />
Just found that IE does not write the name attribute when created in runtime</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gonchuki</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251937</link>
		<dc:creator>gonchuki</dc:creator>
		<pubDate>Mon, 25 Jun 2007 14:34:31 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251937</guid>
		<description>innerHTML may lead to a broken DOM if injected code is erroneous.
using DOM building functions ensures DOM&#039;s sanity and allows for extra functionality such as adding behaviours or setting properties to nodes.</description>
		<content:encoded><![CDATA[<p>innerHTML may lead to a broken DOM if injected code is erroneous.<br />
using DOM building functions ensures DOM&#8217;s sanity and allows for extra functionality such as adding behaviours or setting properties to nodes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andi</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251893</link>
		<dc:creator>Andi</dc:creator>
		<pubDate>Sat, 23 Jun 2007 17:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251893</guid>
		<description>@ Hans: 
- Then a page loaded and build of xhtml will inpredictable, too. Because it&#039;s parsed at runtime just like innerHTML. 
- InnerHTML is a nice function that works in all browsers.
- Thats why I use the firstChild thing ;)</description>
		<content:encoded><![CDATA[<p>@ Hans:<br />
- Then a page loaded and build of xhtml will inpredictable, too. Because it&#8217;s parsed at runtime just like innerHTML.<br />
- InnerHTML is a nice function that works in all browsers.<br />
- Thats why I use the firstChild thing ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francesco</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251885</link>
		<dc:creator>Francesco</dc:creator>
		<pubDate>Sat, 23 Jun 2007 13:35:49 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251885</guid>
		<description>During the development of the first releases of PassPack, I adopted Easy DOM Creation by Michael Geary to quickly manage the DOM elements. But, with the beta4 version of PassPack I needed to overcome Michael&#039;s library&#039;s limits (due to the compatibility with Prototype). So I developed jQuick. It is at http://jquick.sullof.com</description>
		<content:encoded><![CDATA[<p>During the development of the first releases of PassPack, I adopted Easy DOM Creation by Michael Geary to quickly manage the DOM elements. But, with the beta4 version of PassPack I needed to overcome Michael&#8217;s library&#8217;s limits (due to the compatibility with Prototype). So I developed jQuick. It is at <a href="http://jquick.sullof.com" rel="nofollow">http://jquick.sullof.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Schmucker</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251882</link>
		<dc:creator>Hans Schmucker</dc:creator>
		<pubDate>Sat, 23 Jun 2007 10:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251882</guid>
		<description>Because innerHTML is unpredictable, non-standard and doesn&#039;t return references.</description>
		<content:encoded><![CDATA[<p>Because innerHTML is unpredictable, non-standard and doesn&#8217;t return references.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andi</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251878</link>
		<dc:creator>Andi</dc:creator>
		<pubDate>Sat, 23 Jun 2007 04:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251878</guid>
		<description>I still do this with simple innerHTML, to add handlers I grab elements by getElementsByClassName, $ or $$. Example:

var d = $(document.createElement(&#039;div&#039;));
d.update(&#039;Equipments&#039;);
return d.firstChild;

For me it&#039;s the most consequent and natural way to create Element( tree)s. Why use third party libs in this case?</description>
		<content:encoded><![CDATA[<p>I still do this with simple innerHTML, to add handlers I grab elements by getElementsByClassName, $ or $$. Example:</p>
<p>var d = $(document.createElement(&#8216;div&#8217;));<br />
d.update(&#8216;Equipments&#8217;);<br />
return d.firstChild;</p>
<p>For me it&#8217;s the most consequent and natural way to create Element( tree)s. Why use third party libs in this case?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mozbeast</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251874</link>
		<dc:creator>mozbeast</dc:creator>
		<pubDate>Fri, 22 Jun 2007 23:48:31 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251874</guid>
		<description>last i checked FlyDOM was 8x as long as my version and didnt support adding inline event handlers for the elements - once you start doing that with nested functions, lexical scoping and closures you can eliminate the use of selectors (and their inherent selection time) and fragile parent/subling/child traversals...

but the general concept is great. its too bad using an object literal for each DOM literal is more verbose than using an array..</description>
		<content:encoded><![CDATA[<p>last i checked FlyDOM was 8x as long as my version and didnt support adding inline event handlers for the elements &#8211; once you start doing that with nested functions, lexical scoping and closures you can eliminate the use of selectors (and their inherent selection time) and fragile parent/subling/child traversals&#8230;</p>
<p>but the general concept is great. its too bad using an object literal for each DOM literal is more verbose than using an array..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251867</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Fri, 22 Jun 2007 17:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251867</guid>
		<description>I tend to use Dan&#039;s DomBuilder, except when I have to build a &lt;i&gt;lot&lt;/i&gt; of nodes.  Used with MooTools (especially .adopt()), it makes some rather clear code.  If something doesn&#039;t run fast enough, I optimize afterwards by switching to .innerHTML changes.</description>
		<content:encoded><![CDATA[<p>I tend to use Dan&#8217;s DomBuilder, except when I have to build a <i>lot</i> of nodes.  Used with MooTools (especially .adopt()), it makes some rather clear code.  If something doesn&#8217;t run fast enough, I optimize afterwards by switching to .innerHTML changes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Geary</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251864</link>
		<dc:creator>Michael Geary</dc:creator>
		<pubDate>Fri, 22 Jun 2007 17:13:02 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251864</guid>
		<description>There are sure a lot of these. Dan&#039;s DomBuilder is great. There&#039;s also my old DOM creator for jQuery and Prototype (which actually doesn&#039;t depend on either library) from January 2006.

A comment in the Magic DOM post suggests an alternative syntax, which happens to be about the same as Olsow&#039;s version that was posted as a comment to my DOM creator article a year ago. If you like that syntax, a more fully developed version is Ken Stanley&#039;s FlyDOM for jQuery, which is now used at digg.com.

These days I don&#039;t even use my own DOM creator much - instead I use good old innerHTML. Much faster!</description>
		<content:encoded><![CDATA[<p>There are sure a lot of these. Dan&#8217;s DomBuilder is great. There&#8217;s also my old DOM creator for jQuery and Prototype (which actually doesn&#8217;t depend on either library) from January 2006.</p>
<p>A comment in the Magic DOM post suggests an alternative syntax, which happens to be about the same as Olsow&#8217;s version that was posted as a comment to my DOM creator article a year ago. If you like that syntax, a more fully developed version is Ken Stanley&#8217;s FlyDOM for jQuery, which is now used at digg.com.</p>
<p>These days I don&#8217;t even use my own DOM creator much &#8211; instead I use good old innerHTML. Much faster!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Garrett</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251862</link>
		<dc:creator>Garrett</dc:creator>
		<pubDate>Fri, 22 Jun 2007 16:54:55 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251862</guid>
		<description>@Jakob 

I think you&#039;re right. This seems to be a syntax error:&lt;blockquote&gt;&lt;code&gt;
var dl = DL({&#039;class&#039;: &#039;my_dl&#039;},
var dt_equ = DT({&#039;class&#039;: &#039;my_dt&#039;}, &#039;Equipments&#039;));
&lt;/code&gt;
&lt;/blockquote&gt;
&lt;code&gt;
var dt_equ = DT({&#039;class&#039;: &#039;my_dt&#039;}, &#039;Equipments&#039;);
var dl = DL({&#039;class&#039;: &#039;my_dl&#039;}, dt_equ);
&lt;/code&gt;

The first example posted by Ajaxian will have an error.

It&#039;s a good example that shows how taking too many shortcuts can make the code less explicit, and lead to bugs, which are not easy to pinpoint. Jakob found it. 

DOM delegate.

Adds more symbols to the global namespace by creating a series of functions which delegate to the DOM. 

The benefit is that it is shorter to use than the DOM. 

The drawbacks would be: decreased performance due to unnecessary delegate, less explicit, and harder to debug, adds more symbols to the global namespace, which could possibly create a problem.</description>
		<content:encoded><![CDATA[<p>@Jakob </p>
<p>I think you&#8217;re right. This seems to be a syntax error:<br />
<blockquote><code><br />
var dl = DL({'class': 'my_dl'},<br />
var dt_equ = DT({'class': 'my_dt'}, 'Equipments'));<br />
</code>
</p></blockquote>
<p><code><br />
var dt_equ = DT({'class': 'my_dt'}, 'Equipments');<br />
var dl = DL({'class': 'my_dl'}, dt_equ);<br />
</code></p>
<p>The first example posted by Ajaxian will have an error.</p>
<p>It&#8217;s a good example that shows how taking too many shortcuts can make the code less explicit, and lead to bugs, which are not easy to pinpoint. Jakob found it. </p>
<p>DOM delegate.</p>
<p>Adds more symbols to the global namespace by creating a series of functions which delegate to the DOM. </p>
<p>The benefit is that it is shorter to use than the DOM. </p>
<p>The drawbacks would be: decreased performance due to unnecessary delegate, less explicit, and harder to debug, adds more symbols to the global namespace, which could possibly create a problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gonchuki</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251858</link>
		<dc:creator>gonchuki</dc:creator>
		<pubDate>Fri, 22 Jun 2007 16:13:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251858</guid>
		<description>only thing i don&#039;t like is having those function names left in the wild of the global namespace.
It&#039;s good to see people taking Mochikit&#039;s codebase and working from it.</description>
		<content:encoded><![CDATA[<p>only thing i don&#8217;t like is having those function names left in the wild of the global namespace.<br />
It&#8217;s good to see people taking Mochikit&#8217;s codebase and working from it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251856</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Fri, 22 Jun 2007 16:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251856</guid>
		<description>@Theo: It&#039;s stand-alone and light-weight. Not everyone would include an entire library for one functionality.</description>
		<content:encoded><![CDATA[<p>@Theo: It&#8217;s stand-alone and light-weight. Not everyone would include an entire library for one functionality.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Theo</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251854</link>
		<dc:creator>Theo</dc:creator>
		<pubDate>Fri, 22 Jun 2007 15:33:54 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251854</guid>
		<description>Looks exactly like MochiKit.DOM, and just about all the other libraries... what does it offer that makes it more attractive than the existing libraries?</description>
		<content:encoded><![CDATA[<p>Looks exactly like MochiKit.DOM, and just about all the other libraries&#8230; what does it offer that makes it more attractive than the existing libraries?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SÃ©bastien Pierre</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251839</link>
		<dc:creator>SÃ©bastien Pierre</dc:creator>
		<pubDate>Fri, 22 Jun 2007 13:57:07 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251839</guid>
		<description>You can check out the HTMl/XML for JavaScript (http://www.ivy.fr/js/xml) that enables you to do the same things, but you can also generate markups for RSS, RDF, etc using a simple Python script.</description>
		<content:encoded><![CDATA[<p>You can check out the HTMl/XML for JavaScript (<a href="http://www.ivy.fr/js/xml" rel="nofollow">http://www.ivy.fr/js/xml</a>) that enables you to do the same things, but you can also generate markups for RSS, RDF, etc using a simple Python script.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eduardo</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251836</link>
		<dc:creator>Eduardo</dc:creator>
		<pubDate>Fri, 22 Jun 2007 13:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251836</guid>
		<description>Actually it does.
dt_equ is being passed as an argument to the DL() function.</description>
		<content:encoded><![CDATA[<p>Actually it does.<br />
dt_equ is being passed as an argument to the DL() function.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakob Kruse</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251835</link>
		<dc:creator>Jakob Kruse</dc:creator>
		<pubDate>Fri, 22 Jun 2007 12:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251835</guid>
		<description>The example seems to be missing something. Line 7 of the &quot;original&quot; adds &#039;dt_equ&#039; as a child of &#039;dl&#039;. I would be very surprised if line 2 of the example also accomplishes this.</description>
		<content:encoded><![CDATA[<p>The example seems to be missing something. Line 7 of the &#8220;original&#8221; adds &#8216;dt_equ&#8217; as a child of &#8216;dl&#8217;. I would be very surprised if line 2 of the example also accomplishes this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Webb</title>
		<link>http://ajaxian.com/archives/magic-dom/comment-page-1#comment-251834</link>
		<dc:creator>Dan Webb</dc:creator>
		<pubDate>Fri, 22 Jun 2007 12:08:53 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=2509#comment-251834</guid>
		<description>I wrote DomBuilder a while a go and this is almost identical except that it doesn&#039;t include the cross browser attribute support (which renders this version pretty unusable to be honest).  If you want this functionality I&#039;d really recommend using DomBuilder:

http://svn.danwebb.net/external/DomBuilder/trunk/dombuilder.js</description>
		<content:encoded><![CDATA[<p>I wrote DomBuilder a while a go and this is almost identical except that it doesn&#8217;t include the cross browser attribute support (which renders this version pretty unusable to be honest).  If you want this functionality I&#8217;d really recommend using DomBuilder:</p>
<p><a href="http://svn.danwebb.net/external/DomBuilder/trunk/dombuilder.js" rel="nofollow">http://svn.danwebb.net/external/DomBuilder/trunk/dombuilder.js</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

