User:Zekesonxx/Haml

Haml (HTML Abstraction Markup Language) is a lightweight markup language that is used to describe the XHTML of any web document without the use of traditional inline coding. It is designed to address many of the flaws in traditional templating engines, as well as making markup as elegant as it can be. Haml functions as a replacement for inline page templating systems such as PHP, RHTML, and ASP. However, Haml avoids the need for explicitly coding XHTML into the template, because it is itself a description of the XHTML, with some code to generate dynamic content.

Haml's equivalent for CSS is Sass.

Principles
HAML was created initially by Hampton Catlin as an experiment to satisfy the following core principles:

- Markup should be beautiful - Markup should be DRY - Markup should be well-indented - HTML structure should be clear

Example
Note: This is a simple preview example and may not reflect the current version of the language.

The above Haml would produce this XHTML:

Implementations
The official implementation of Haml has been built for Ruby with plugins for Ruby on Rails and Merb, but the Ruby implementation also functions independently.

There are also implementations in other languages:
 * HamlPy (Python)
 * LuaHaml (Lua)
 * MonoRail NHaml (ASP.NET)
 * NHaml (.NET)
 * Fammel (PHP)
 * HAML-TO-PHP (PHP5)
 * pHAML (PHP)
 * phamlp (PHP)
 * phpHaml (PHP5)
 * Multi target HAML (PHP5.3)
 * haml-js (JavaScript)
 * Text::Haml (Perl)
 * Scalate (Scala)
 * JHaml (Java)
 * Hart (Dart)
 * cl-haml (Common Lisp)

Development
Haml was created in May 2006 by Hampton Catlin. Shortly thereafter Natalie Weizenbaum became integral in the design of many of Haml's features and maintained the implementation for many years.