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
1.2k
Hogan.js
Twitter Open Source Summit
January, 31, 2012
sayrer
February 01, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
生成AIを安心して活用するために──「情報セキュリティガイドライン」策定とポイント
gree_tech
PRO
1
350
Building a cloud native business on open source
lizrice
0
170
AI時代、“平均値”ではいられない
uhyo
8
2.4k
Introdução a Service Mesh usando o Istio
aeciopires
1
280
様々なファイルシステム
sat
PRO
0
230
Digitization部 紹介資料
sansan33
PRO
1
5.7k
FinOps について (ちょっと) 本気出して考えてみた
skmkzyk
0
210
From Natural Language to K8s Operations: The MCP Architecture and Practice of kubectl-ai
appleboy
0
170
Observability for the system understanding and curious by developers
maruloop
1
230
Dylib Hijacking on macOS: Dead or Alive?
patrickwardle
0
460
クラウドとリアルの融合により、製造業はどう変わるのか?〜クラスメソッドの製造業への取組と共に〜
hamadakoji
0
380
ハノーファーメッセ2025で見た生成AI活用ユースケース.pdf
hamadakoji
0
420
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
36
7k
Producing Creativity
orderedlist
PRO
347
40k
Reflections from 52 weeks, 52 projects
jeffersonlam
353
21k
Why Our Code Smells
bkeepers
PRO
340
57k
Thoughts on Productivity
jonyablonski
70
4.9k
The Cost Of JavaScript in 2023
addyosmani
55
9.1k
KATA
mclloyd
PRO
32
15k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Navigating Team Friction
lara
190
15k
Build The Right Thing And Hit Your Dates
maggiecrowley
38
2.9k
Side Projects
sachag
455
43k
Six Lessons from altMBA
skipperchong
29
4k
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!