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

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Javascript Template Engine - Getting Started

354
views

Published on

An introduction to Javascript Template Engine

An introduction to Javascript Template Engine

Published in: Technology, Business

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
354
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

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