Skip to content

Comment on A Case for Strongly Typed HTML Templating Languages

Comments

Templates that are valid HTML are the right answer, unlike most templates which are string based because historically most server side templates have been string based (which I personally detest). No need for yet another template language!

An example is http://batmanjs.org/ , and maybe most XML based templates too.

I ended up writing my own pure HTML templates (templates implemented using cloning - super simple and fast), with declarative definitions written in JavaScript. Declarative definitions and events are linked to HTML nodes by data-nodename attributes within the template.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.