3 Replies - 948 Views - Last Post: 01 September 2011 - 03:57 PM Rate Topic: -----

#1 Sadin56  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 183
  • Joined: 19-December 10

HAML in Rails

Posted 31 August 2011 - 08:33 PM

Does anyone else here use HAML in their ruby on rails apps. What you you think of it if you do does it increase productivity and the speed in which tasks can be completed? If you dont use it why not? are there downsides? opinions?

Im trying to get to know some of these methods better and what other developers have thought of them so imay decide what to use for my rails project.

thanks in advance!
Is This A Good Question/Topic? 0
  • +

Replies To: HAML in Rails

#2 The Neoracle  Icon User is offline

  • Check, check, 1, 2.
  • member icon

Reputation: 21
  • View blog
  • Posts: 4,097
  • Joined: 30-March 01

Re: HAML in Rails

Posted 31 August 2011 - 08:41 PM

Haml is a 100% personal preference. It's less performant than ERB, and seems to solve the problem of not being able to type greater than and less than signs fast enough (so, not a problem), but some people swear by it. I find it completely pointless and I hate translating html to haml just so I don't have to type a couple brackets.
Was This Post Helpful? 1
  • +
  • -

#3 Sadin56  Icon User is offline

  • D.I.C Head

Reputation: 12
  • View blog
  • Posts: 183
  • Joined: 19-December 10

Re: HAML in Rails

Posted 01 September 2011 - 03:10 AM

View PostThe Neoracle, on 31 August 2011 - 08:41 PM, said:

Haml is a 100% personal preference. It's less performant than ERB, and seems to solve the problem of not being able to type greater than and less than signs fast enough (so, not a problem), but some people swear by it. I find it completely pointless and I hate translating html to haml just so I don't have to type a couple brackets.


okay great thanks for your input
Was This Post Helpful? 0
  • +
  • -

#4 NotarySojac  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 53
  • View blog
  • Posts: 428
  • Joined: 30-September 10

Re: HAML in Rails

Posted 01 September 2011 - 03:57 PM

I'm always starting out my work in plain HTML, and then I convert it over to erb (if needed). But going from HTML to haml is kind of icky, so it wouldn't be ideal for most of my projects.

I scoped out someone's github a while ago (can't find them now) and he was using haml to make pages consisting of mostly just lists, headers and images, and his code looked remarkably neat and simple.

One considerable drawback though, is that if you're working with designers, are they going to get it? Probably not if they're they're the graphics art/ photoshop type designers and already have experience with html.

To me, some of the efficiency comes from not having to specify div as it's default.

HTML
<div id="scroll-up" class="triangle triangleU"></div>



HAML
#scroll-up.triangle.triangleU



I might consider learning this down the road, but there's so much cooler stuff out there in rails that, unless I get stuck on a team using it, I'd rather just focus on models and controllers rather than become "HAML native".
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1