<?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: Cheating on ERB with HAML</title>
	<atom:link href="http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/</link>
	<description>Malicious enjoyment derived from observing someone else's misfortune</description>
	<lastBuildDate>Fri, 12 Feb 2010 23:24:33 +0000</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Chris</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-129</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-129</guid>
		<description>Just now learning Rails.  Today was my first time using HAML.  Very nice.  Also easy to install.</description>
		<content:encoded><![CDATA[<p>Just now learning Rails.  Today was my first time using HAML.  Very nice.  Also easy to install.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ericson Smith</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-130</link>
		<dc:creator>Ericson Smith</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-130</guid>
		<description>I looked at HAML a year ag, and looked again.

Don&#039;t want to be a killjoy, but is it faster than erb? If not, why bother?

When you have a big site to run, its a no go. For smaller experimental sites, its probably worth it. Besides, its another language that my designer has to learn.</description>
		<content:encoded><![CDATA[<p>I looked at HAML a year ag, and looked again.</p>
<p>Don&#8217;t want to be a killjoy, but is it faster than erb? If not, why bother?</p>
<p>When you have a big site to run, its a no go. For smaller experimental sites, its probably worth it. Besides, its another language that my designer has to learn.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hank</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-131</link>
		<dc:creator>Hank</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-131</guid>
		<description>Ericson:
I&#039;m more or less done with Rails, so I don&#039;t have to do much erb anymore.  After using HAML for a while on some fairly advanced sites, I found it to be a pain when a lot of logic needed to be done in the view.

Lately, I&#039;ve become a fan of Django and its template language.  If you work with a designer, I would definitely recommend using something like Liquid if you plan to stick with Rails.

I have never worked with a designer, and a good template language would be essential if I had to.  Giving them erb would give them too much power, and HAML, as you&#039;ve stated, doesn&#039;t really give them anything over it other than quick and dirty speed with less customizability.

Thanks for the question, though!</description>
		<content:encoded><![CDATA[<p>Ericson:<br />
I&#8217;m more or less done with Rails, so I don&#8217;t have to do much erb anymore.  After using HAML for a while on some fairly advanced sites, I found it to be a pain when a lot of logic needed to be done in the view.</p>
<p>Lately, I&#8217;ve become a fan of Django and its template language.  If you work with a designer, I would definitely recommend using something like Liquid if you plan to stick with Rails.</p>
<p>I have never worked with a designer, and a good template language would be essential if I had to.  Giving them erb would give them too much power, and HAML, as you&#8217;ve stated, doesn&#8217;t really give them anything over it other than quick and dirty speed with less customizability.</p>
<p>Thanks for the question, though!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Glenn Gillen</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-132</link>
		<dc:creator>Glenn Gillen</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-132</guid>
		<description>@ericson: I&#039;ve deployed numerous large sites and as far as performance is concerned, Haml has never been an issue. In fact, according to [these benchmarks](http://nex-3.com/posts/57-haml-benchmark-inaccuracies) it was never really that slow. If you&#039;re that concerned with performance you should be using erubius rather than erb. The argument for Haml vs ERB is the same as the one for Ruby vs *insert &quot;enterprise&quot; framework here*. It&#039;s not claiming to be the fastest, but the savings from legibility, structure, etc that manifest in less wasted developer hours out weigh the ~16% performance hit... a hit you only have to wear in the unlikely scenario that you&#039;re not doing any caching.

@hank: It took me far too long to try it but I&#039;m finally a complete convert, make sure you check out the ugly step-brother of Haml, Sass.</description>
		<content:encoded><![CDATA[<p>@ericson: I&#8217;ve deployed numerous large sites and as far as performance is concerned, Haml has never been an issue. In fact, according to [these benchmarks](http://nex-3.com/posts/57-haml-benchmark-inaccuracies) it was never really that slow. If you&#8217;re that concerned with performance you should be using erubius rather than erb. The argument for Haml vs ERB is the same as the one for Ruby vs *insert &quot;enterprise&quot; framework here*. It&#8217;s not claiming to be the fastest, but the savings from legibility, structure, etc that manifest in less wasted developer hours out weigh the ~16% performance hit&#8230; a hit you only have to wear in the unlikely scenario that you&#8217;re not doing any caching.</p>
<p>@hank: It took me far too long to try it but I&#8217;m finally a complete convert, make sure you check out the ugly step-brother of Haml, Sass.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Weizenbaum</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-133</link>
		<dc:creator>Nathan Weizenbaum</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-133</guid>
		<description>Performance-wise, the most recent Haml version is about even with ERB. It&#039;s faster in some cases, slower in others, but on average it&#039;s more or less the same.

About logic in the views, Hank is right, Haml doesn&#039;t work well for that. That&#039;s intentional: Haml is built on the philosophy that logic doesn&#039;t belong in views, that it belongs in helpers and the controller. Making logic and large blocks of Ruby code awkward encourages users to find a better way of doing things in the first place.

And as for designers, I&#039;ve heard it said that designers are often very fond of Haml because it&#039;s so closely tied with CSS, which is what they really think in.</description>
		<content:encoded><![CDATA[<p>Performance-wise, the most recent Haml version is about even with ERB. It&#8217;s faster in some cases, slower in others, but on average it&#8217;s more or less the same.</p>
<p>About logic in the views, Hank is right, Haml doesn&#8217;t work well for that. That&#8217;s intentional: Haml is built on the philosophy that logic doesn&#8217;t belong in views, that it belongs in helpers and the controller. Making logic and large blocks of Ruby code awkward encourages users to find a better way of doing things in the first place.</p>
<p>And as for designers, I&#8217;ve heard it said that designers are often very fond of Haml because it&#8217;s so closely tied with CSS, which is what they really think in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loy</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-134</link>
		<dc:creator>Loy</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-134</guid>
		<description>@ericson: I am the designer half of my team. Haml was ok to learn, because Sass is awesome. The ability to have variables makes it worth what little time it took to learn Haml. Just changed all the serif fonts on a website today by changing one word in the variable.</description>
		<content:encoded><![CDATA[<p>@ericson: I am the designer half of my team. Haml was ok to learn, because Sass is awesome. The ability to have variables makes it worth what little time it took to learn Haml. Just changed all the serif fonts on a website today by changing one word in the variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fsafdas</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-135</link>
		<dc:creator>fsafdas</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-135</guid>
		<description>@Hank: logic in the view?? are you crazy??</description>
		<content:encoded><![CDATA[<p>@Hank: logic in the view?? are you crazy??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: railsjedi</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-136</link>
		<dc:creator>railsjedi</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-136</guid>
		<description>.menu#menu= partial ‘layouts/menu’

Much nicer! https://github.com/jcnetdev/better_partials

I wrote it specifically for use with Haml (thought its just a wrapper around render helper so it works with any view framework.</description>
		<content:encoded><![CDATA[<p>.menu#menu= partial ‘layouts/menu’</p>
<p>Much nicer! <a href="https://github.com/jcnetdev/better_partials" rel="nofollow">https://github.com/jcnetdev/better_partials</a></p>
<p>I wrote it specifically for use with Haml (thought its just a wrapper around render helper so it works with any view framework.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dag</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-137</link>
		<dc:creator>Dag</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-137</guid>
		<description>Designers shouldn&#039;t touch views. They should touch styles. They should touch unobtrusive javascripts. Views should be touched by programmers. Programmers who see markup as data, not as design. The naming layouts and views is bad.

Of course, most scaffolds and helpers suck in this regard.</description>
		<content:encoded><![CDATA[<p>Designers shouldn&#8217;t touch views. They should touch styles. They should touch unobtrusive javascripts. Views should be touched by programmers. Programmers who see markup as data, not as design. The naming layouts and views is bad.</p>
<p>Of course, most scaffolds and helpers suck in this regard.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Henry</title>
		<link>http://www.ralree.com/2007/02/08/cheating-on-erb-with-haml/comment-page-1/#comment-138</link>
		<dc:creator>Henry</dc:creator>
		<pubDate>Thu, 08 Feb 2007 01:30:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.ralree.info/2007/10/13/cheating-on-erb-with-haml#comment-138</guid>
		<description>A nicety of haml ... a view spec like this matters:

    describe &#039;site/content_page&#039; do
      it &quot;should render&quot; do
        &#039;render &#039;site/content_page&#039;
        response.should be_success
      end
    end

Now if anyone fools around with the haml markup on that template, that test will fail far more often than if it was written in erb.</description>
		<content:encoded><![CDATA[<p>A nicety of haml &#8230; a view spec like this matters:</p>
<p>    describe &#8217;site/content_page&#8217; do<br />
      it &quot;should render&quot; do<br />
        &#8216;render &#8217;site/content_page&#8217;<br />
        response.should be_success<br />
      end<br />
    end</p>
<p>Now if anyone fools around with the haml markup on that template, that test will fail far more often than if it was written in erb.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.391 seconds -->
