Generated by GPT-5-mini| Haml (templating system) | |
|---|---|
| Name | Haml |
| Author | Hampton Catlin |
| Released | 2006 |
| Programming language | Ruby |
| Operating system | Cross-platform |
| License | MIT License |
Haml (templating system) Haml is a templating language designed to simplify HTML generation within web frameworks. It emphasizes indentation-based structure and reduced syntax noise to facilitate rapid development for projects that integrate with languages and platforms such as Ruby (programming language), Rails, Sinatra, Merb and template ecosystems like ERB and Slim. Its design influenced tooling and paradigms adopted by communities around GitHub, Heroku, Basecamp, Engine Yard, and other web-focused organizations.
Haml provides a concise alternative to traditional markup by eliminating explicit closing tags and reducing attribute verbosity, which attracted contributors from projects at Google, Facebook, Twitter, LinkedIn, Shopify, and Spotify. Early adoption occurred among teams familiar with Ruby on Rails, DHH, Yehuda Katz, Aaron Patterson, David Heinemeier Hansson, and other prominent figures in the open-source movement. Its ecosystem intersected with package and dependency managers such as RubyGems, Bundler, npm, Yarn, and platforms like Travis CI, CircleCI, Jenkins for continuous integration.
Haml's syntax centers on indentation and shorthand tokens to represent elements, classes, and IDs, which appealed to developers influenced by languages and tools like Python, CoffeeScript, SASS, LESS, and Haxe. Templates integrate with view helpers from ActionView, and work alongside libraries such as ActiveRecord, Sequel, Datamapper, Padrino, and Hanami. The feature set includes filters and partials, enabling interoperability with assets managed by Sprockets, Webpack, Babel, UglifyJS, and preprocessors used in projects at Mozilla, Microsoft, Apple, and Intel. Haml supports interpolation and control structures that map to server-side constructs found in frameworks like Django, Laravel, ASP.NET, Express.js and Symfony.
Implementations were primarily written in Ruby (programming language), but bindings and ports appeared to serve ecosystems around Python (programming language), JavaScript, Node.js, PHP, Java (programming language), and Go (programming language). Integrations included adapters for template engines in Rails, Sinatra, Padrino, Middleman, Jekyll, Refinery CMS, and static site generators leveraged by teams at Netlify, Vercel, GitLab, and Bitbucket. Tooling aligned with editors and IDEs such as Vim, Emacs, Sublime Text, Atom, Visual Studio Code, JetBrains, and Eclipse, and with testing frameworks like RSpec, Minitest, Test::Unit, Capybara, Selenium, and Cucumber.
Performance characteristics were compared with engines such as ERB, Slim, Mustache, Handlebars, Liquid, Jinja2, Twig, and Velocity. Haml's compilation to HTML introduced considerations similar to those faced by projects at Facebook and Google when rendering server-side templates under high concurrency in environments managed by NGINX, Unicorn, Puma, Passenger, and Phusion Passenger. Security discussions referenced practices advocated by organizations such as OWASP, CERT, NIST, and by contributors from Mozilla and Apache Software Foundation to mitigate issues like cross-site scripting addressed in CSP policies and secure header configurations.
Haml found use in startups and enterprises alike, from Basecamp and GitHub style product teams to agencies building sites for clients including BBC, The Guardian, CNN, and Bloomberg. It was chosen for rapid prototyping, content management systems, e-commerce platforms integrating with Spree Commerce, Solidus, and integrations with payment gateways used by Stripe, PayPal, Braintree, and Authorize.Net. Educational projects at institutions like MIT, Stanford University, Harvard University, and UC Berkeley referenced templating approaches contrasting Haml with technologies taught in courses alongside Node.js, React, AngularJS, Vue.js, and server frameworks such as Flask and Spring Framework.
Haml originated in the mid-2000s, authored by Hampton Catlin, with later contributions by maintainers and community members including people active in the Ruby on Rails ecosystem and contributors associated with GitHub, Engine Yard, ThoughtWorks, 37signals, and various open-source projects hosted on GitLab and SourceForge. The project evolved alongside contemporaneous initiatives like SASS by Natalie Weizenbaum and teams at Google Summer of Code, incorporating patches, forks, and language ports influenced by conferences such as RailsConf, RubyConf, JSConf, StrangeLoop, and FOSDEM. Licensing under permissive terms enabled adoption by organizations ranging from Canonical to Red Hat and IBM.
Category:Templating languages