#haml.about

Haml is a markup language that’s used to cleanly and simply describe the XHTML of any web document without the use of inline code. Haml functions as a replacement for inline page templating systems such as PHP, ASP, and ERB, the templating language used in most Ruby on Rails applications. However, Haml avoids the need for explicitly coding XHTML into the template, because it itself is a description of the XHTML, with some code to generate dynamic content.

Core Principles

Haml's development as a language is based on adherence to several core principles. These are:

Markup should be beautiful
Markup should not be used merely as a tool to get browsers to render a page how the author wants it rendered. The rendering isn't the only thing people have to see; they have to see, modify, and understand the markup as well. Thus, the markup should be just as user-friendly and pleasant as the rendered result.
Markup should be DRY
XHTML involves major repetition. Every element is named twice: once before its content and once after. ERB adds even more repetition and unnecessary characters. HAML avoids all of this by relying on indentation, not text, to determine where elements and blocks of code begin and end. Not only does this result in smaller templates, it makes the code much cleaner to look at.
Markup should be well-indented
One of the major problems with ERB is that not only does it not encourage well-indented code, it actively makes it challenging, or even impossible, to write. This leads to confusing, unreadable XHTML, when it should be well indented and reflecting the underlying structure of the document. Haml automatically properly formats all tags to that it does.
XHTML structure should be clear
XML and XHTML are formats built upon the idea of a structured document. That structure is reflected in their markup, and it should likewise be reflected in meta-markup such as Haml Because Haml's logic is based on indentation of child elements, this structure is naturally preserved, making the document much easier and more logical for mere humans to read.

History

Haml was created because Hampton got really annoyed having to keep hand-typing out templates. So many advances have been made in web-development, but the template has remained the same. Time for something new.

Based off those frustrations, Haml was born as an experiment. However, Haml quickly proved itself in several production-level websites created at Unspace Interactive. In fact, the entire company's development team quickly shrugged off RHTML completely and have gone entirely to Haml based development.

Haml quickly proved itself to be a productivity boon. Also, designers love Haml for its similarities to CSS.

Things are better in WebDev land since Haml arrived.

The Haml Team

Haml was originally created by Hampton Catlin (hcatlin@gmail.com), who's the driving force behind it and the brains of the operation. Help with the Ruby On Rails implementation and much of the documentation by Jeff Hardy (packagethief).

Nathan Weizenbaum (Nex3) contributed the original code for the buffered engine, along with many other enhancements including the silent-line syntax ("-"). He does much of the grunt coding work, and also helped to set up this site.

License

The Haml implementation is available under the MIT License.