What are Templating Engines? - PowerPoint PPT Presentation

About This Presentation
Title:

What are Templating Engines?

Description:

A template processor (also referred to as a template engine or template parser) is software designed to mix templates with a knowledge model to supply result documents. – PowerPoint PPT presentation

Number of Views:9

less

Transcript and Presenter's Notes

Title: What are Templating Engines?


1
What are Templating Engines?
  • WWW.STUDYSECTION.COM

2
(No Transcript)
3
  • A template processor (also referred to as a
    template engine or template parser) is software
    designed to mix templates with a knowledge model
    to supply result documents.
  • The language that the templates are written in is
    understood as a template language or templating
    language.
  • In simple words, A template engine is a mechanism
    that enables you to use static template files in
    your application.
  • Template engine replaces the variables inside a
    web template file with actual values(at runtime),
    and transforms the template into an HTML file
    sent to the client with the dynamic data. This
    technique makes it easier to style an HTML page.
  • From the below diagram the functionality of
    Templating Engines is clear i.e. how the data
    from the database are shown on the HTML page
    dynamically.

4
(No Transcript)
5
Some commonly used Templating Engines with
examples.
  • Blade Template You may display data that is
    passed to your Blade views(HTML) by wrapping the
    variable in curly braces. For example, given the
    below route
  • Routeget('/', function ()
  • return view('welcome', 'name' gt 'Samantha')
  • )
  • You may also display the contents of the name
    variable like so
  • Hello, name .

6
  • Blades echo statements are automatically
    sent through PHPs htmlspecialchars function to
    stop XSS attacks.
  • EJS(Embedded JavaScript templating)
  • Embedded Javascript Templating is a templating
    engine used in Node.js.
  • EJS is a simple templating language that is used
    to create the HTML markup with plain JavaScript.
  • lt if (user) gt
  • lth2gtlt user.name gtlt/h2gt
  • lt gt

7
  • Pug
  • Pug in node. js is a template engine that uses
    case-sensitive syntax to create HTML, in other
    words, it returns a string of HTML rendered as
    per data identified in a pug file. We can say
    that pug is a middleman who plays a task to
    convert the injected data and translate it into
    HTML syntax
  • doctype html
  • html(lang'en')
  • head
  • title Hello, World!
  • body
  • h1 Hello, World!
  • div.remark
  • p Pug rocks!

8
Online Testing Certificate Exam
  • Salesforce Apex Unit Testing Certification Exam
    (Expert)
  • Software Testing Expert Certification Exam
  • Salesforce Development, Testing And Package
    Deployment Expert Certification Exam
  • Blackbox Testing Expert Certification Exam
  • Web Testing Expert Certification Exam
  • Whitebox Testing Expert Certification Exam

9
About StudySection
  • Welcome to StudySection - the most loved online
    platform for eCertification in several subjects
    including but not limited to Software
    Development, Quality Assurance, Business
    Administration, Project Management, English,
    Aptitude and more. From more than 70 countries
    students are StudySection Certified. If you are
    not yet StudySection certified it's not late. You
    can start right now.
  • Being StudySection Certified helps you take your
    education level few notches up and have an edge
    over other candidates when you need it the most.
    Globally, our students are employed in different
    organizations and are utilizing the benefit of
    being certified with us.
Write a Comment
User Comments (0)
About PowerShow.com