[LRUG] HAML

Stephen Bartholomew steve at curve21.com
Thu Dec 10 07:33:26 PST 2009


> Willing to listen if someone can show me I'm wrong.


Haml isn't so much of an abstraction as a distillation of HTML.  It's  
HTML with the crap removed - which means there are a few language  
hoops to jump through of course - but most of it matches syntax we're  
already used to:

.customers

outputs:

  <div class="customers">

#wrapper

outputs:

<div id="wrapper">

The references here are just like CSS (for which you should *of  
course* be using Sass...).

As for the outputted code, it's very well marked up.  Haml has a  
number of options for the format of the outputted code as well as  
shortcuts for doc types etc.  When I look at HTML produced by Haml,  
it's just how I would mark it up by hand.

One area Haml does fall short is when your writing large blocks of  
text.    For most database-driven apps this isn't an issue though and  
you can use filters like markdown within a Haml template.

That's my attempt :)

Steve

--
Stephen Bartholomew

Curve21

www.curve21.com
07729 60 60 79
steve at curve21.com




More information about the Chat mailing list