2. Wat? Web Template Engine - Pull in content and combine with layout & structure template to produce native web output i.e.: pull content out of a DB, process along with template to produce pure HTML output Grails gsp: <ul> <g:each in="${items}" var="item"> <li>${item}</li> </g:each> </ul> ------------------------------------------------------------------------------------------------------ <ul> <li>Grails</li> <li>Groovy</li> </ul>
3. Why? Obvious one – support dynamic content Provides if-then-else logic, iteration Separation of Concern - separate presentation from content Modularized – break out header, footer, etc
4. JS - Client or Server? JS has client-side templating most notably jquery and underscore With the advent of node you get support for (more traditional?) server-side templating We chose to go with client-side, to support our efforts using Spine.js, and since we are just using websockets Interesting argument from hij1nx of nodejitsuhttp://blog.nodejitsu.com/micro-templates-are-dead
11. !!! 5 html(lang="en") head title= pageTitle script(type='text/javascript') if (foo) { bar() } body h1 Jade - node template engine #container - if (youAreUsingJade) p You are amazing - else p Get on it!