Template Engines in 5 Minutes
Will Klein
What is templating?
Take HTML (or something like it)
dynamic data (typically JSON)
and bind them together.
Pseudo-example
Ever do this?
'<a href="' + link.url + '">' + link.text + '</a>'
Instead, let's do this:
<a href="{{ link.url }}">{{ link.text }}</a>
Choose a Flavor
Mustache
Jade
Transparency
Best Practices
Pre-compile to JS functions
Render server-side
Share templates across server & client