HAML and SASS - worth the conversion with rails?

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.

Ä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 )

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
[email protected]

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

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.

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
[email protected]

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…

Ä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
[email protected]

Ä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
[email protected]

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.

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!