I'm looking for a templating engine. What are the important factors to consider when choosing among HAML, SASS/Compass and ERB?
What are the main differences between HAML, SASS/Compass and ERB?
Asked Answered
To summarize:
- Haml is a markup language
- Sass is a set of CSS extensions that compile into standard CSS
- Compass is a wrapper for Sass around things like Blueprint
- Erb is simply HTML with embedded Ruby code.
Generally, you'll be looking at Haml or Erb (though you can mix and match them if you need to), and CSS or Sass. Compass is simply an add-on to Sass.
I'd recommend starting with Haml and Sass, as Haml takes most of the annoying, bug-prone aspects of HTML and ditches them. Once you get used to writing in Haml, using Erb feels very wordy.
As for CSS, pick a framework (such as Blueprint), and use it as-is to start. You can always add Compass on later if you feel that you need it.
© 2022 - 2024 — McMap. All rights reserved.