2 ms·
Ruby and Python templating engines are better.
by Daishiman 16y ago
Ruby and Python templating engines are better.
- some1else 16y agoHaml/Sass is the best thing that happened to my view layer (next to wonderful Ruby blocks, iterators and chaining)
- epochwolf 16y agoLook up NHaml.
- kennedywm 16y agoHow so? I haven't used them and I wouldn't mind reading a comparison.
- Daishiman 16y agoThe driving philosophy of these engines is that your presentation layer should not contain any logic that goes beyond the rendering of data, and your templating should be an aid to outputting HTML, not merely a medium. Take Django templates, for example: you output data using tags and filters, with support for defining commonly-used blocks of HTML to reduce redundancy. Take Haml, which uses CSS selector syntax to reduce the amount of HTML boileplate to a bare minimum. The common factor of these engines is that your end up writing less code than plain HTML, and unlike this new engine for ASP, the mixing of code and presentation doesn't look completely horrendous.