Poornima Venkatakrishnan: Template Specialization with Express Apps [JSConf2014]
1,471 views · Published 16 July 2014 · 21:54 · Indexed 12 November 2026
Channel: JSConf · 2014 · Science & Technology
Template specialization is a way to dynamically switch the partials in your views based on the request/response context. This becomes vital for big corporations like Paypal since we have cases where parts of the views are customized based on locale, device, user profile based A/B tests etc.This idea was born out of the work we did to support template specialization with Krakenjs suite - the open sourced bootstrapping framework from Paypal. However, the idea is general enough to be implemented directly with vanilla express apps. This talk will demo template specialization in express apps with dust templates. Dust is a powerful javascript template engine which works well with node.js, and also provides the hooks required to add this capability. Additionally, I will also go over the recipe to enable specialization for any template engine, provided the engine exposes the hooks to tap into the render work flow to do your magic!
More from this channel
-
29:49
Michael Bebenita & Shu-yu Guo: Low Level JavaScript
-
29:19
Michael Starzinger: The Footprint of Performance
-
27:17
Florian Loitsch: JavaScript as a compilation target - Making it fast
-
32:24
Jing Jin & Matthew Delaney: The Web's Black Magic
-
31:38
Anders Heijlsberg & Luke Hoban: Introducing TypeScript
-
24:59
Kevin Markman: Taking Web Apps Offline
-
26:28
Max Krohn: IcedCoffeeScript
-
30:46
Sam Dutton: WebRTC: Real-time communication without plugins