18. Unification
• Javascript Templates, CDN caching
• Write once
• JSON for data
• One Standard
• Event-ed Server as JSON Aggregator + JS
V8 engine
• Scale once
19. JavaScript templates
• Evaluated tons, handlebars, dust, mustache
• Good: Simple, less logic, 4KB, precompiled
to javascript, performance is a feature
• Bad: None are mature enough, i18n/
formatters not out of the box
20. _t = “Hello {name}! json = {
You have {count} new "name": ”James",
messages from "count": 2,
{#people} “people” : [{ “name” : “Jim”,
{name}, “distance” : “2”
{/people} },{ “name”: ”Eran”
”; “distance” : “1”}
]
}
!dust.render(_t, json, function(error, data) {!
$(“mydiv”).html(data);!
}!
Hello James! You have 2 new
messages from Jim, Eran!