<?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: Jaml: An HTML builder a la Haml</title>
	<atom:link href="http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 09 Feb 2012 06:55:33 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
	<item>
		<title>By: twfarland</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-284614</link>
		<dc:creator>twfarland</dc:creator>
		<pubDate>Fri, 09 Jul 2010 13:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-284614</guid>
		<description>Another piece of feedback for Jaml:

It would be nice to be able to use anonymous functions within the template registration call. It would help to be able to do this:

Jaml.register(&#039;selector&#039;, function(c){
select({&#039;name&#039;:&#039;name-&#039;+c.id},
function(){											   
   for (i in c.opts){
      option({&#039;value&#039;:c.opts[i].val}, c.opts[i].text);
    }						
  })
});</description>
		<content:encoded><![CDATA[<p>Another piece of feedback for Jaml:</p>
<p>It would be nice to be able to use anonymous functions within the template registration call. It would help to be able to do this:</p>
<p>Jaml.register(&#8216;selector&#8217;, function(c){<br />
select({&#8216;name&#8217;:'name-&#8217;+c.id},<br />
function(){<br />
   for (i in c.opts){<br />
      option({&#8216;value&#8217;:c.opts[i].val}, c.opts[i].text);<br />
    }<br />
  })<br />
});</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: twfarland</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-284613</link>
		<dc:creator>twfarland</dc:creator>
		<pubDate>Fri, 09 Jul 2010 12:31:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-284613</guid>
		<description>I just found Jaml and I like it. For portability, it might also be a nice addition to be able to specify the template with &#039;pure&#039; json like so:

var data = {
&quot;id&quot; : 123,
&quot;link_text&quot; : &quot;My link&quot;			
}

x.register(&#039;myhtml&#039;,function(data){	
&quot;div&quot; : [
{&quot;class&quot; : &quot;myclass&quot;, &quot;id&quot; : &quot;mydiv-&quot; + data.id},	
{ &quot;a&quot; : [{&quot;id&quot; : &quot;mylink-&quot; + data.id },	data.link_text]}
]	
})

x.render(&#039;myhtml&#039;, data);</description>
		<content:encoded><![CDATA[<p>I just found Jaml and I like it. For portability, it might also be a nice addition to be able to specify the template with &#8216;pure&#8217; json like so:</p>
<p>var data = {<br />
&#8220;id&#8221; : 123,<br />
&#8220;link_text&#8221; : &#8220;My link&#8221;<br />
}</p>
<p>x.register(&#8216;myhtml&#8217;,function(data){<br />
&#8220;div&#8221; : [<br />
{"class" : "myclass", "id" : "mydiv-" + data.id},<br />
{ "a" : [{"id" : "mylink-" + data.id },	data.link_text]}<br />
]<br />
})</p>
<p>x.render(&#8216;myhtml&#8217;, data);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: enekoalonso</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278660</link>
		<dc:creator>enekoalonso</dc:creator>
		<pubDate>Tue, 02 Feb 2010 18:13:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278660</guid>
		<description>I think it&#039;s obvious these tools are not meant to replace HTML files or server generated HTML.

In the other hand, nowadays we have sites that are more and more dynamic, putting a lot of resources on the client side. And it happens that we need to generate HTML code from Javascript, from building small page blocks to full page structures, single page sites, etc.

How we generate that HTML from JS is the question, and the Jaml syntax is a very good and nice way to do it :)</description>
		<content:encoded><![CDATA[<p>I think it&#8217;s obvious these tools are not meant to replace HTML files or server generated HTML.</p>
<p>In the other hand, nowadays we have sites that are more and more dynamic, putting a lot of resources on the client side. And it happens that we need to generate HTML code from Javascript, from building small page blocks to full page structures, single page sites, etc.</p>
<p>How we generate that HTML from JS is the question, and the Jaml syntax is a very good and nice way to do it :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: reacher</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278207</link>
		<dc:creator>reacher</dc:creator>
		<pubDate>Tue, 26 Jan 2010 00:46:01 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278207</guid>
		<description>Everything old is new again :D 
&lt;code&gt;
use CGI &#039;:standard&#039;;
print blockquote(
&quot;Many years ago on the island of&quot;,
a({href=&gt;&quot;http://crete.org/&quot;},&quot;Crete&quot;),
&quot;there lived a minotaur named&quot;,
strong(&quot;Fred.&quot;),
),
hr;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Everything old is new again :D<br />
<code><br />
use CGI ':standard';<br />
print blockquote(<br />
"Many years ago on the island of",<br />
a({href=&gt;"http://crete.org/"},"Crete"),<br />
"there lived a minotaur named",<br />
strong("Fred."),<br />
),<br />
hr;</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eyelidlessness</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278168</link>
		<dc:creator>eyelidlessness</dc:creator>
		<pubDate>Sun, 24 Jan 2010 05:07:33 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278168</guid>
		<description>quixote218,

It really depends on the structure of your application. The point isn&#039;t really to keep your languages separate, but to keep your logic domains separate. In some circumstances—an application that requires Javascript, perhaps intended for only certain user agents (eg Air) or devices (eg iPhone); server-side Javascript—it can make sense to do &lt;strong&gt;all of your document construction&lt;/strong&gt; in Javascript. Likewise, it can make sense to do all of your styling in Javascript.

I personally find that idea appealing. You know, assuming that the application is intended for that sort of environment. I&#039;d still keep my Javascript &quot;stylesheets&quot; separate from my Javascript &quot;views&quot; separate from my Javascript &quot;controllers&quot; separate from my Javascript &quot;models&quot; and so on. But in some cases there&#039;s no reason not to do everything in one language. Context-switching between the languages can be awful.</description>
		<content:encoded><![CDATA[<p>quixote218,</p>
<p>It really depends on the structure of your application. The point isn&#8217;t really to keep your languages separate, but to keep your logic domains separate. In some circumstances—an application that requires Javascript, perhaps intended for only certain user agents (eg Air) or devices (eg iPhone); server-side Javascript—it can make sense to do <strong>all of your document construction</strong> in Javascript. Likewise, it can make sense to do all of your styling in Javascript.</p>
<p>I personally find that idea appealing. You know, assuming that the application is intended for that sort of environment. I&#8217;d still keep my Javascript &#8220;stylesheets&#8221; separate from my Javascript &#8220;views&#8221; separate from my Javascript &#8220;controllers&#8221; separate from my Javascript &#8220;models&#8221; and so on. But in some cases there&#8217;s no reason not to do everything in one language. Context-switching between the languages can be awful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: quixote218</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278166</link>
		<dc:creator>quixote218</dc:creator>
		<pubDate>Sat, 23 Jan 2010 22:04:05 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278166</guid>
		<description>Seems to me that using Javascript to create HTML templates is a little backwards. Javascript is probably best when it only manipulates existing HTML, with as little code as possible linking the structure of the HTML to the behavior of the manipulation. Anything else is endorsing the idea that your JS code must change when your HTML changes, and that the person doing the maintenance must be an expert at both. It&#039;s a similar problem to putting style information in your JS — sometimes it&#039;s the easiest way to just get it done, but the easiest foundation to lay down is rarely the best foundation for continued growth.</description>
		<content:encoded><![CDATA[<p>Seems to me that using Javascript to create HTML templates is a little backwards. Javascript is probably best when it only manipulates existing HTML, with as little code as possible linking the structure of the HTML to the behavior of the manipulation. Anything else is endorsing the idea that your JS code must change when your HTML changes, and that the person doing the maintenance must be an expert at both. It&#8217;s a similar problem to putting style information in your JS — sometimes it&#8217;s the easiest way to just get it done, but the easiest foundation to lay down is rarely the best foundation for continued growth.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sroussey</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278158</link>
		<dc:creator>sroussey</dc:creator>
		<pubDate>Sat, 23 Jan 2010 00:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278158</guid>
		<description>Reminds me of domplate...</description>
		<content:encoded><![CDATA[<p>Reminds me of domplate&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: enekoalonso</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278153</link>
		<dc:creator>enekoalonso</dc:creator>
		<pubDate>Fri, 22 Jan 2010 18:06:29 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278153</guid>
		<description>I love Jaml, the idea is great and it is very user friendly and very useful when building Javascript driven applications (specially single page web applications).

A few days ago I created Mooml, a Jaml port that takes advantage of Mootools functions and classes. Check it out if you work with Mootools:
http://github.com/eneko/mooml/</description>
		<content:encoded><![CDATA[<p>I love Jaml, the idea is great and it is very user friendly and very useful when building Javascript driven applications (specially single page web applications).</p>
<p>A few days ago I created Mooml, a Jaml port that takes advantage of Mootools functions and classes. Check it out if you work with Mootools:<br />
<a href="http://github.com/eneko/mooml/" rel="nofollow">http://github.com/eneko/mooml/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dperini</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278150</link>
		<dc:creator>dperini</dc:creator>
		<pubDate>Fri, 22 Jan 2010 16:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278150</guid>
		<description>@eyelidlessness,
single-reflow DOM operations are always the fastest, using DOM fragments and cloning elements is usually improving DOM operations a lot too.

In javascript &quot;calling out&quot; from main function body is one of the most expensive operations (because the scope/stack have to be saved and restored), so in nested loops it is a must to avoid that.

Creating &quot;expandos&quot; on elements causes reflow, at least in IE.

Using innerHTML in IE is not safe and not suggested even by less expert javascripters and it is maybe unsafe to do that also on other browsers.

In frameworks like ExtJS using something like this JAML &quot;builder&quot; make perfect sense, speed will still be very high if the simple boosting rules above are followed.</description>
		<content:encoded><![CDATA[<p>@eyelidlessness,<br />
single-reflow DOM operations are always the fastest, using DOM fragments and cloning elements is usually improving DOM operations a lot too.</p>
<p>In javascript &#8220;calling out&#8221; from main function body is one of the most expensive operations (because the scope/stack have to be saved and restored), so in nested loops it is a must to avoid that.</p>
<p>Creating &#8220;expandos&#8221; on elements causes reflow, at least in IE.</p>
<p>Using innerHTML in IE is not safe and not suggested even by less expert javascripters and it is maybe unsafe to do that also on other browsers.</p>
<p>In frameworks like ExtJS using something like this JAML &#8220;builder&#8221; make perfect sense, speed will still be very high if the simple boosting rules above are followed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eyelidlessness</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278143</link>
		<dc:creator>eyelidlessness</dc:creator>
		<pubDate>Fri, 22 Jan 2010 15:34:56 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278143</guid>
		<description>&lt;blockquote&gt;I don’t use it anymore, as it’s not fast. I always build html as text and inject it via innerHTML it’s ten times faster and (in real world scenarios) difference is noticable&lt;/blockquote&gt; This really depends on a lot of details, most prominently which browser you&#039;re running. Single-reflow DOM operations (that is, single element additions, or elements added to a hidden div which is then attached) can be faster in the faster engines (WebKit, Gecko).</description>
		<content:encoded><![CDATA[<blockquote><p>I don’t use it anymore, as it’s not fast. I always build html as text and inject it via innerHTML it’s ten times faster and (in real world scenarios) difference is noticable</p></blockquote>
<p> This really depends on a lot of details, most prominently which browser you&#8217;re running. Single-reflow DOM operations (that is, single element additions, or elements added to a hidden div which is then attached) can be faster in the faster engines (WebKit, Gecko).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aphrodisiac</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278123</link>
		<dc:creator>Aphrodisiac</dc:creator>
		<pubDate>Fri, 22 Jan 2010 11:37:39 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278123</guid>
		<description>Very intresting, have we heard this idea before?</description>
		<content:encoded><![CDATA[<p>Very intresting, have we heard this idea before?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: medikoo</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278121</link>
		<dc:creator>medikoo</dc:creator>
		<pubDate>Fri, 22 Jan 2010 08:33:25 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278121</guid>
		<description>I&#039;ve used exactly same idea 3 years ago. Anyway, sharing is very important step :)

Side note: I don&#039;t use it anymore, as it&#039;s not fast. I always build html as text and inject it via innerHTML it&#039;s ten times faster and (in real world scenarios) difference is noticable</description>
		<content:encoded><![CDATA[<p>I&#8217;ve used exactly same idea 3 years ago. Anyway, sharing is very important step :)</p>
<p>Side note: I don&#8217;t use it anymore, as it&#8217;s not fast. I always build html as text and inject it via innerHTML it&#8217;s ten times faster and (in real world scenarios) difference is noticable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: syntacticx</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278114</link>
		<dc:creator>syntacticx</dc:creator>
		<pubDate>Fri, 22 Jan 2010 01:21:49 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278114</guid>
		<description>&lt;a href=&quot;http://activejs.org/view.html&quot; rel=&quot;nofollow&quot;&gt;ActiveView&lt;/a&gt; has a similar syntax, without the use of eval (use of &quot;with&quot; is optional). I&#039;m planning on releasing a standalone version soon.</description>
		<content:encoded><![CDATA[<p><a href="http://activejs.org/view.html" rel="nofollow">ActiveView</a> has a similar syntax, without the use of eval (use of &#8220;with&#8221; is optional). I&#8217;m planning on releasing a standalone version soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sixtyseconds</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278112</link>
		<dc:creator>sixtyseconds</dc:creator>
		<pubDate>Thu, 21 Jan 2010 20:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278112</guid>
		<description>@FredrikB - Fair point. I guess it&#039;s just not a style that I&#039;m used to. Bring on &lt;code&gt;new Element(&#039;div&#039;, {...});&lt;/code&gt; any day!</description>
		<content:encoded><![CDATA[<p>@FredrikB &#8211; Fair point. I guess it&#8217;s just not a style that I&#8217;m used to. Bring on <code>new Element('div', {...});</code> any day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saroskar</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278111</link>
		<dc:creator>saroskar</dc:creator>
		<pubDate>Thu, 21 Jan 2010 18:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278111</guid>
		<description>If you are worried about use of eval() or global namespace pollution take a look at &lt;a href=&quot;http://saroskar.github.com/PaJes/&quot; rel=&quot;nofollow&quot;&gt;PaJes&lt;/a&gt;. It is very similar in nature and (optionally) tackles global namespace pollution problem by using CommonJS module pattern (PaJes-CommonJS.js). It also has some additional goodies like functional looping (forEach) and conditionals(checkIf), painless inclusion of JavaScript source code in the HTML output and support for adding new childrens to HTML tags created  somewhere else in the code (example 6 from the documentation).</description>
		<content:encoded><![CDATA[<p>If you are worried about use of eval() or global namespace pollution take a look at <a href="http://saroskar.github.com/PaJes/" rel="nofollow">PaJes</a>. It is very similar in nature and (optionally) tackles global namespace pollution problem by using CommonJS module pattern (PaJes-CommonJS.js). It also has some additional goodies like functional looping (forEach) and conditionals(checkIf), painless inclusion of JavaScript source code in the HTML output and support for adding new childrens to HTML tags created  somewhere else in the code (example 6 from the documentation).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FredrikB</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278110</link>
		<dc:creator>FredrikB</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:51:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278110</guid>
		<description>@sixtyseconds
You&#039;re comparing different code! 
This is how the Jaml example would look like in MochiKit.DOM:

DIV(null,
  H1(&quot;Some title&quot;),
  P(&quot;Some exciting paragraph text&quot;), 
  BR(),
 
  UL(null,
    LI(&quot;First item&quot;),
    LI(&quot;Second item&quot;),
    LI(&quot;Third item&quot;)
  )
);

(you can choose to use MochiKit.DOM: namespace for all tags also)
Agree the initial MochiKit example could be intimidating at first look, but that&#039;s mostly because it also shows of the functional programming techniques and how they coerce to DOM (like templates).</description>
		<content:encoded><![CDATA[<p>@sixtyseconds<br />
You&#8217;re comparing different code!<br />
This is how the Jaml example would look like in MochiKit.DOM:</p>
<p>DIV(null,<br />
  H1(&#8220;Some title&#8221;),<br />
  P(&#8220;Some exciting paragraph text&#8221;),<br />
  BR(),</p>
<p>  UL(null,<br />
    LI(&#8220;First item&#8221;),<br />
    LI(&#8220;Second item&#8221;),<br />
    LI(&#8220;Third item&#8221;)<br />
  )<br />
);</p>
<p>(you can choose to use MochiKit.DOM: namespace for all tags also)<br />
Agree the initial MochiKit example could be intimidating at first look, but that&#8217;s mostly because it also shows of the functional programming techniques and how they coerce to DOM (like templates).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: eyelidlessness</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278109</link>
		<dc:creator>eyelidlessness</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:42:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278109</guid>
		<description>&lt;blockquote&gt; Remember that the more function calls you have the slower your code will execute!&lt;/blockquote&gt; Remember that the more code you execute, the slower your code will execute. Duh?

How is it any different from any other way of interacting with the DOM? Abstractions necessarily add a little overhead, but not necessarily much.</description>
		<content:encoded><![CDATA[<blockquote><p> Remember that the more function calls you have the slower your code will execute!</p></blockquote>
<p> Remember that the more code you execute, the slower your code will execute. Duh?</p>
<p>How is it any different from any other way of interacting with the DOM? Abstractions necessarily add a little overhead, but not necessarily much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tercero12</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278108</link>
		<dc:creator>tercero12</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:40:24 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278108</guid>
		<description>@sixtyseconds And it hasn&#039;t kept up with the times.  A series of quick updates in 2008 and since that, no activity since 2006. 

Actually at a former workplace, I migrated them off of Mochikit to YUI and have never regretted it.</description>
		<content:encoded><![CDATA[<p>@sixtyseconds And it hasn&#8217;t kept up with the times.  A series of quick updates in 2008 and since that, no activity since 2006. </p>
<p>Actually at a former workplace, I migrated them off of Mochikit to YUI and have never regretted it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sixtyseconds</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278106</link>
		<dc:creator>sixtyseconds</dc:creator>
		<pubDate>Thu, 21 Jan 2010 16:24:25 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278106</guid>
		<description>@FredrikB - And their code is also fugly...

&lt;code&gt;
var rows = [
    [&quot;dataA1&quot;, &quot;dataA2&quot;, &quot;dataA3&quot;],
    [&quot;dataB1&quot;, &quot;dataB2&quot;, &quot;dataB3&quot;]
];
row_display = function (row) {
    return TR(null, map(partial(TD, null), row));
}
var newTable = TABLE({&#039;class&#039;: &#039;prettytable&#039;},
    THEAD(null,
        row_display([&quot;head1&quot;, &quot;head2&quot;, &quot;head3&quot;])),
    TFOOT(null,
        row_display([&quot;foot1&quot;, &quot;foot2&quot;, &quot;foot3&quot;])),
    TBODY(null,
        map(row_display, rows)));
&lt;/code&gt;

...or not.</description>
		<content:encoded><![CDATA[<p>@FredrikB &#8211; And their code is also fugly&#8230;</p>
<p><code><br />
var rows = [<br />
    ["dataA1", "dataA2", "dataA3"],<br />
    ["dataB1", "dataB2", "dataB3"]<br />
];<br />
row_display = function (row) {<br />
    return TR(null, map(partial(TD, null), row));<br />
}<br />
var newTable = TABLE({'class': 'prettytable'},<br />
    THEAD(null,<br />
        row_display(["head1", "head2", "head3"])),<br />
    TFOOT(null,<br />
        row_display(["foot1", "foot2", "foot3"])),<br />
    TBODY(null,<br />
        map(row_display, rows)));<br />
</code></p>
<p>&#8230;or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: andriijas</title>
		<link>http://ajaxian.com/archives/jaml-an-html-builder-a-la-haml/comment-page-1#comment-278104</link>
		<dc:creator>andriijas</dc:creator>
		<pubDate>Thu, 21 Jan 2010 13:34:39 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=8457#comment-278104</guid>
		<description>Remember that the more function calls you have the slower your code will execute!</description>
		<content:encoded><![CDATA[<p>Remember that the more function calls you have the slower your code will execute!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

