9

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, Java'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?

Mantas Vidutis
  • 16,376
  • 20
  • 76
  • 92
Dan Burton
  • 53,238
  • 27
  • 117
  • 198

5 Answers5

7

Mustache maybe.

Andy Ford
  • 8,410
  • 3
  • 26
  • 36
3

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.

Charles
  • 50,943
  • 13
  • 104
  • 142
0

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.

Kamiccolo
  • 7,758
  • 3
  • 34
  • 47
0

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

SQLMason
  • 3,275
  • 1
  • 30
  • 40
0

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

Eran Medan
  • 44,555
  • 61
  • 184
  • 276