Just a quick post to let everybody know that i’m switching my erb templates over to HAML. All my css with SASS will follow. These two template engines enhance my productivity a lot. it’s compatible with rails 2.
I must admit that there are still some issues like: No ruby code on multiple lines to format the code properly on very long ruby statements. And: HAML source code highlighting in netbeans plugin is quite old and not updated, but this doesnt stop me from using it.
just checkout the “showdown” on the bottom of the first page to get a feeling of HAML.
sound very good .. but what about the speed? i am wondering if the extra parsing lacks a bit?
afaik it has the same overhead as every erb template has. it’s not a real difference i guess. and after all speed in view templates doesn’t matter that much i think. the db is the major bottleneck in webapps nowadays. but i do enjoy the lesser code i have to write. and if you are for real performance: why arent you writing your webapps with a true c++ webframework like “Wt”:
fab: The recommended way of dealing with long Ruby statements in a Haml template is to move the statement into a helper method. This tends to make your views much clearer and can help facilitate abstraction.
Michal: Haml’s roughly on par with ERB as of the most recent release. The parsing is constant time; the file is parsed once and compiled to a Ruby method, which is run with each successive rendering.
Also, it’s mightily confusing to have the most recent comments on the top.
why arent you writing your webapps with a true c++ webframework like “Wt”:
:)))) i dont really care .. i was just wondering. i prefer nice & readable code over performance …