开发者

Uniform HTML templating language

It seems like every web framework has its own pet template language. Ruby has eRuby, Python's django uses the Django template language, Haskell has Heist and Hamlet, J开发者_运维知识库ava's got JSP, and then there's PHP...

My question is, has anyone tried creating One Templating Language to Rule Them All? Are there any such templating languages that at least have some widespread support amongst the varying web frameworks?


Mustache maybe.


XSLT might be a candidate as a "universal" template language.

It might also be the greatest evil that this land has ever seen, but that's up for debate.


NHAML/HAML is the closest you'll get to a standard.


Freemarker (and Velocity to some extent) seem to be supported by a growing number of frameworks (Spring, Tiles, Struts and more) and can be used to generate code in any framework, but I don't think there is "one template engine to rule them all". If there was though, I would choose Freemarker any day


uh... Trying to find something like that for WEB project which would be able to render html from same templates at both sides. Server and Client. Already mentioned Mustache seams to be most suitable choice so far...

Maybe this JSON based solution will sound interesting...

Also HAML looks promising.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜