O'Reilly logo

Node.js in Action, Second Edition by Bradley Meck Alex Young and Mike Cantelon

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Web application templating

This chapter covers

  • Organizing applications with templating
  • Creating templates by using Embedded JavaScript
  • Learning minimalist templating with Hogan
  • Using Pug to create templates

In chapters 3 and 6, you learned some basics about templates in Express applications 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 7.2, where you’ll start learning about the template engines detailed in this chapter, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required