Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hogan.js
Search
sayrer
February 01, 2012
Technology
2
1k
Hogan.js
Twitter Open Source Summit
January, 31, 2012
sayrer
February 01, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
株式会社EventHub・エンジニア採用資料
eventhub
0
1.9k
Postman v10リリース後を振り返る
nagix
0
140
Tebiki株式会社 エンジニア採用資料
tebiki
0
4.1k
キャラクター制御のためのプロンプト術 for LINE Bot
uezo
0
530
「共通基盤」を超えよ! 今、Platform Engineeringに取り組むべき理由
jacopen
25
5.9k
DevOpsメトリクスとアウトカムの接続にトライ!開発プロセスを通して計測できるメトリクスの活用方法
ham0215
2
200
社内勉強会運営のコツ
senoo
6
1.2k
VS CodeでAWSを操作しよう
smt7174
4
350
[PlatformCon 24] Platform Orchestrators: The Missing Middle of Internal Developer Platforms?
danielbryantuk
1
180
最近たまに見かけるTiDBってなんだ? - Findy
pingcap0315
2
630
HEXA OSINT CTF V3 作戦会議
meow_noisy
0
110
サーバー間 GraphQL と webmock-graphql の話 / server-to-server graphql and webmock-graphql
qsona
2
110
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
50
8.6k
Music & Morning Musume
bryan
41
5.6k
Git: the NoSQL Database
bkeepers
PRO
422
63k
Build The Right Thing And Hit Your Dates
maggiecrowley
23
2k
Unsuck your backbone
ammeep
662
57k
Reflections from 52 weeks, 52 projects
jeffersonlam
344
19k
What the flash - Photography Introduction
edds
64
11k
Being A Developer After 40
akosma
56
580k
Designing with Data
zakiwarfel
95
4.8k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
The Mythical Team-Month
searls
215
42k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
24
2.3k
Transcript
Hogan.js Twitter Open Source Summit January 31, 2012
@sayrer
Agenda
What is Mustache? {{#showform}} <form> <label>Label</label> {{{some_markup}}} <label class="checkbox"> <input
type="checkbox"> {{#i18n}}Check me out{{/i18n}} </label> <button class="{{class}}">Submit</button> </form> {{/showform}}
Why Mustache? •Similar to HTML, easy to edit •Mock data
as JSON files •Programmers not required
Designer
Language Support •Mustache.rb •Mustache.java •Mustache.js...
Problems •Performance •Runtime compilation •Forked
Choices •Work on Mustache.js •Dust.js •Handlebars.js •or...
Hogan.js •Compile on the server •Parser API •Performance
At Runtime var s = "some {{example}} text"; var template
= Hogan.compile(s); template.render({example: "foo"}); "some foo text"
Compiled var s = "some {{example}} text"; var template =
Hogan.compile(s); function(c,p,i){ var _ = this; _.b(i=i||""); _.b("some "); _.b(_.v(_.f("example",c,p,0))); _.b(" text"); return _.fl(); } "some foo text"
IE7 Performance
with iPhone 5
with Firefox 3.6
with Chrome 17
Uses at Twitter •Tweet embedding •Bootstrap build process •and soon,
Twitter.com
twitter.github.com/hogan.js Find us online: twitter.com/sayrer twitter.com/fat github.com/twitter/hogan.js Thanks!