# HAML and SASS - worth the conversion with rails?

**URL:** <https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976>\
**Category:** Rails\
**Created:** [June 10, 2009, 9:38pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976 "2009-06-10T21:38:55Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 10, 2009, 9:38pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/1 "2009-06-10T21:38:55Z")

</div>

Has anyone developed extensive projects with HAML and SASS and is it  
worth the effort to convert and utilize those markup languages?

The reason why I ask is I’m getting ready to dive down into my views and  
work with CSS and the HTML and I’m trying to find ways to improve upon  
my coding…

Thanks.

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 10, 2009, 10:58pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/2 "2009-06-10T22:58:59Z")

</div>

Ã„lphÃ¤ BlÃ¼Ã« wrote:

> Has anyone developed extensive projects with HAML and SASS and is it  
> worth the effort to convert and utilize those markup languages?

Absolutely (in particular if you use the Haml \>2.1.0 or the haml-edge  
gem)! Haml is basically HTML with less typing. Sass is a really,  
really powerful way of abstracting your CSS, allowing for clearer, more  
semantic markup by eliminating the need for presentation classes. I  
highly recommend them both.

For an example of what you can do with Sass if you’re really going all  
out, check out Chris Eppstein’s Compass project (I believe that’s  
[http://www.compasscss.org](http://www.compasscss.org) )

> The reason why I ask is I’m getting ready to dive down into my views and  
> work with CSS and the HTML and I’m trying to find ways to improve upon  
> my coding…

Then Haml and Sass will be very useful. Among other things, Haml makes  
it very hard to do Bad Things in HTML.  
And of course you needn’t exclusively decide on one or the other. I  
have a few projects where for one reason or another, I use both Haml and  
ERb.

Now if someone would only make Kwartz work with Rails 2…

> Thanks.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 10, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/3 "2009-06-10T23:04:52Z")

</div>

Quick question before I commit…

I’m using netbeans IDE 6.5 when interfacing with my project. How do the  
haml/sass conversions take place for my project files? Is this  
something I run with a ruby script?

For instance, I saw something on the web like this:

[http://snippets.dzone.com/posts/show/6838](http://snippets.dzone.com/posts/show/6838)

Is this what needs to be done or can you walk me very quickly through  
the mechanics of installation/first project (or provide a tutorial)?

Many thanks.

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 10, 2009, 11:18pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/4 "2009-06-10T23:18:27Z")

</div>

Marnen Laibow-Koser wrote:

> Ã„lphÃ¤ BlÃ¼Ã« wrote:
> 
> > Quick question before I commit…
> > 
> > I’m using netbeans IDE 6.5 when interfacing with my project. How do the  
> > haml/sass conversions take place for my project files?  
> > […]
> 
> ## What conversions? I don’t understand what you’re asking. Best,
> 
> Marnen Laibow-Koser  
> [http://www.marnen.org](http://www.marnen.org)  
> removed\_email\_address@domain.invalid

Hi Marnen,

Click the link and you’ll see what I mean. It may just be an old post.  
From the way I was reading it, the .erb files in views are converted…

Maybe I’m misunderstanding this…

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 10, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/5 "2009-06-10T23:15:39Z")

</div>

Ã„lphÃ¤ BlÃ¼Ã« wrote:

> Quick question before I commit…
> 
> I’m using netbeans IDE 6.5 when interfacing with my project. How do the  
> haml/sass conversions take place for my project files?  
> […]

## What conversions? I don’t understand what you’re asking. Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 10, 2009, 11:32pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/6 "2009-06-10T23:32:25Z")

</div>

Ã„lphÃ¤ BlÃ¼Ã« wrote:  
[…]

> Click the link and you’ll see what I mean. It may just be an old post.  
> From the way I was reading it, the .erb files in views are converted…
> 
> Maybe I’m misunderstanding this…

Indeed you are. That’s just a little script to automatically convert  
all your ERb files to Haml if you want to do that. It’s not absolutely  
necessary to do so – after all, as I said earlier, you can have ERb and  
Haml templates in the same project – and there’s certainly no need to  
use that script. It’s just a utility program designed to switch entire  
projects over from ERb to Haml.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 11, 2009, 3:45pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/7 "2009-06-11T15:45:03Z")

</div>

I’d pick one set of views and convert those first. Choose a model that  
has some of the moderately complex views, with partials involved.  
You’ll learn HAML, all your changes are restricted to a single set of  
views, and the rest of your app goes merrily on its way while you  
sharpen your skills.

I love HAML for the brevity in the code, and the readability.

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [June 10, 2009, 11:40pm UTC](https://www.ruby-forum.com/t/haml-and-sass-worth-the-conversion-with-rails/169976/8 "2009-06-10T23:40:17Z")

</div>

Marnen Laibow-Koser wrote:

> 

Thanks for the clarification on that. So, I don’t have to do that and I  
can still use haml in my projects…

Many thanks!
