Rails & Templates

Marc at oreilly radar has a post about rails. One of his points is he doesn’t like putting code in templates. This is something i have to agree with him on. As long as you have no security model in your templates it’ll never be possible to create a good CMS in rails. DHH disagrees but he’s created space for other templating systems to be plugged in. The current offerings of amrita, amrita2, and cerise are all following a TAL style markup where flow is embedded within html tags. To me, that feels more ugly than having real code embedded in your templates. Although, it does support editing the templates in dreamweaver. For odeo our designers edit their html and css directly, so we don’t need that.

Ideally there would be a system similar to template toolkit with a clear tagging system. In TT you can use embedded perl (it’s perl based) but you can also turn that off.

One thing i’ve thought about is trying to get rails to work with clearsilver a fast c based templating system. But i’m surprised it hasn’t caught on more, which worries me that perhaps there is something fundamentally wrong with it.

In my ideal world, template toolkit would be ported to ruby… but i don’t have the time to do that.


About this entry