Chapter 11. Web application templating

This chapter covers

  • How templating helps keep applications organized
  • Creating templates using Embedded JavaScript
  • Learning minimalist templating with Hogan
  • Using Jade to create templates

In chapters 8 and 9, you learned some templating basics to use with the Express framework in order to create views. In this chapter, you’ll focus exclusively on templating, learning how to use three popular template engines and how to use templating to keep any web application’s code clean by separating logic from presentation markup.

If you’re familiar with templating and the model-view-controller (MVC) pattern, you can skim through to section 11.2, where you’ll start learning about the template engines we’ll detail ...

Get Node.js in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.