Javascript Template Engine - Getting Started
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Javascript Template Engine - Getting Started

on

  • 483 views

An introduction to Javascript Template Engine

An introduction to Javascript Template Engine

Statistics

Views

Total Views
483
Views on SlideShare
483
Embed Views
0

Actions

Likes
1
Downloads
12
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Javascript Template Engine - Getting Started Presentation Transcript

  • 1. Javascript Template Engine Prabhakaran UX Developer, Reportbee Executive Member, RIA-RUI Society
  • 2. Javascript Template Engine?
  • 3. Javascript Template Engine? Output = Template( input, data )
  • 4. Input Data Output
  • 5. Why & When to use? • Decouple HTML and JS • Code maintainability • For large projects
  • 6. Why & When to use? • • • • When you think you are JS Ninja When you need to work on your code again Good value for your resume Follow the trend
  • 7. Client-side Templates • • • • • • • • • Mustache.js Handlebars.js EJS Underscore.js JsRender Hogan.js by Twitter Dust.js by Linkedin jQuery templates etc, etc…
  • 8. Server-side Templates • Jade • Slim • etc, etc…
  • 9. Templates Type • Logical templates • Logicless templates
  • 10. Logical Templates
  • 11. Logicless Templates
  • 12. Choosing Right Template • • • • • • • Speed Logic or Logicless Pre-compilation Active development Community support File size Client or Server side
  • 13. Mustache
  • 14. Handlebars? • Has advanced features and can satisfy almost all kinds of requirement • Has most active community • Its a logicless templating engine • Lot of frameworks use Handlebars by default
  • 15. Handlebars • • • • • Expressions Data or context Compiler Block helpers Partials
  • 16. Expressions
  • 17. Data
  • 18. Compile
  • 19. Block Helper
  • 20. Get hands dirty ( Check sample.html )
  • 21. @prabhakaran_v Karan.prabhu@gmail.com