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
1.2k
2
Share
Hogan.js
Twitter Open Source Summit
January, 31, 2012
sayrer
February 01, 2012
Other Decks in Technology
See All in Technology
生成AIが変える SaaS の競争原理と弁護士ドットコムのプロダクト戦略
bengo4com
1
2.2k
AIコーディング時代における、ソフトウェアサプライチェーン攻撃に対する防衛術(簡易版)
soysoysoyb
0
120
「責任あるAIエージェント」こそ自社で開発しよう!
minorun365
9
2.2k
Expiration of Secure Boot Certificates for vSphere Virtual Machines
mirie_sd
0
110
Chasing Real-Time Observability for CRuby
whitegreen
0
200
AI時代 に増える データ活用先
takahal
0
320
AWS Transform CustomでIaCコードを自由自在に変換しよう
duelist2020jp
0
120
MLOps導入のための組織作りの第一歩
akasan
0
360
国内外の生成AIセキュリティの最新動向 & AIガードレール製品「chakoshi」のご紹介 / Latest Trends in Generative AI Security (Domestic & International) & Introduction to AI Guardrail Product "chakoshi"
nttcom
4
1.4k
AI: Making Admin and Users, Lives Better
kbmsg
0
110
Pure Intonation on Browser: Building a Sequencer with Ruby
nagachika
0
150
データを"持てない"環境でのアノテーション基盤設計
sansantech
PRO
1
140
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
New Earth Scene 8
popppiees
3
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
150
Building Flexible Design Systems
yeseniaperezcruz
330
40k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
4 Signs Your Business is Dying
shpigford
187
22k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
530
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
The Cost Of JavaScript in 2023
addyosmani
55
9.9k
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!