Hey,
On Sat, Nov 21, 2009 at 2:44 AM, Paul Walker <
pjwa...@gmail.com> wrote:
>
> HAML seems to be the most popular choice of rubyists, but I fail to
> understand why. I don't understand the desire to put markup in some
> pseudo wiki format that the front end portion of my team would have to
> learn. Is the Haml draw that of those that don't like to concern
> themselves with the actual markup? Is it one of those that desire to
> all logic in ruby code?
It's not pseudo wiki, actually it's simplified HTML (you get to type
half of it).
You can represent HTML in many ways (Haml, s-expressions, Ruby blocks,
etc.), and every time the idea is to type less and make the code more
clear.
> I've been using erubis:
http://www.kuwata-lab.com/erubis/ and am
> satisfied with everything except that I can't call sinatra helpers
> within the templates (although I can call functions defined in the top
> DSL).
>
> I'd like to hear your thoughts on template libraries and why you're
> using what you are :-).
I started with Erb, but moved to Haml once I realized I could
accomplish the same with less typing and less noise.
Haml is very strict with the parsing and indentation, so IMO it yields
better markup than handwritten HTML/Erb. The HTML/CSS guys I know can
work with templates in Haml and they love it, even if they don't know
a bit of Ruby.
--
Michel