Activity Not Available

Ratings and Reviews : Listing

  Analyzed about 1 year ago based on code collected about 1 year ago.


Showing page 1 of 1
Peter Bex says:
Avatar
 
...makes editing HTML more comfortable  
4
   
written about 5 years ago

With regular HTML (or ERB), closing tags all the time and indenting gets annoying and it's too easy to get the nesting wrong, especially when you have some nested conditionally shown HTML fragments or after moving stuff around in a HTML file.

Haml fixes these problems once and for all: it replaces opening/closing tags to nest tags by using indentation to indicate the structure.

The Haml syntax makes the tree structure of HTML much clearer and with the Emacs mode that's shipped with it, editing is really a breeze.

There are also some disadvantages: Haml's syntax does not allow hashes on both the attributes side and the content side of a tag. It also makes it hard to nest things in such a way that only the outer part of markup differ, with common inner content. You're forced to use a partial then, or repeat the inner content for each variation of outer markup.

Last but not least, inline javascript (or other types of non-html content) is painful when you need to use Ruby code in it, because the Ruby is evaluated in another environment than the surrounding template.

On the whole, Haml gets a well-deserved 4 stars, for making my Rails templating life much easier.

1 out of 1 users found the following review helpful.
Did this review help you?

 
 
 

Creative Commons License Copyright © 2013 Black Duck Software, Inc. and its contributors, Some Rights Reserved. Unless otherwise marked, this work is licensed under a Creative Commons Attribution 3.0 Unported License . Ohloh ® and the Ohloh logo are trademarks of Black Duck Software, Inc. in the United States and/or other jurisdictions. All other trademarks are the property of their respective holders.