Blueprint
  • Blueprint Developer Guide
  • Quick Start
    • Getting Started
    • My First Application
      • Creating Your Application
      • Controllers
      • Routers & Routes
      • Services
      • Resources & Resource Controllers
      • Validating & Sanitizing Input
      • Unit Testing Your Application
      • Policies
  • Developer Guide
    • The Object Model
      • Introduction
      • Classes and Instances
      • Computed Properties
      • Aggregated Properties
      • Mixins
    • Routers and Controllers
      • Introduction
      • Routers
      • Controllers
      • Resources
    • Models
    • The Server
    • Policy Framework
    • Services
    • Messaging Framework
    • Configuration Management
    • Application and Resources
      • Lookup Operation
      • Views
      • Assets
    • Blueprint Modules
    • Blueprint Cluster
      • What is a Blueprint Cluster?
      • Running a Blueprint Cluster
      • Technical Details
    • Testing Framework
    • Command-line Interface (Coming Soon)
Powered by GitBook
On this page
  • What is a View?
  • Supported View Types
  1. Developer Guide
  2. Application and Resources

Views

PreviousLookup OperationNextAssets

Last updated 7 years ago

What is a View?

We briefly introduced you to views when we discussed in the router definition. Views are well-defined, reusable representation of a response to a request. Views can be static—meaning there are no variable definitions in the view, or dynamic—meaning there are variable portions in the view.

All views are located in app/views.

Supported View Types

Blueprint does not have its own, proprietary view type. Instead, Blueprint support any view type (i.e., template engine) supported by . You just have to

  1. Install the node module for the template engine you plan to use for your view type; and

  2. The extension of the view must match the name of its corresponding template engine.

For example, if you want to use as the template engine for your views, then your views must have the file extension in .pug. Likewise, if you want to use , then your views must have the file extension .handlebars.

Blueprint will automatically configure Express to support the different kinds of views located in app/views. There is no need to manually register the different template engines with Express.

consolidate.js
pug
handlebars
binding actions to static views