Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Hogan.js
Search
sayrer
February 01, 2012
Technology
1.2k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hogan.js
Twitter Open Source Summit
January, 31, 2012
sayrer
February 01, 2012
Transcript
18 slides
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!
Other Decks in Technology
See All in Technology
Shared Signals Framework 仕様解説
oidfj
0
430
Kiro IDE 入門 (画面の各部から、頼み方、任せ方、戻し方まで) | 目指せ Kiro マスター 02
inariku
PRO
4
240
An Introduction to Context Ontology Accelerator (teaching AI agents what your data means)
inariku
PRO
1
260
少ない人手 限られた予算 それでも守る 消せない・見つける・戻れる オールハザード型BCP on AWS / 20261107 Mitsutoshi Matsuo
shift_evolve
PRO
0
390
顧客合意を取りながら進めるAWSコスト削減の実践
optim
0
170
AWS基盤改善を支える 私たちの理念と行動指針
kentosuzuki
0
220
小さなエージェントから始めてみよう!実践コンテキストエンジニアリング
iwamot
PRO
0
120
サボる子はいねぇがー!AgentCoreハーネスの脆弱性に学ぶ、エージェントの入力バリデーション
iwamot
PRO
5
340
Reticulum, le réseau cypherpunk dont vous avez besoin !
rlifchitz
0
140
生成AI時代のIAMのマニアックな話
takuros
6
3.2k
AWS Emulator を評価する: 手元で動く AWS の API の仕組み、始め方、確かめ方
inariku
PRO
1
600
変更差分を読むために環境を整備しよう
pipepasta
1
300
Featured
See All Featured
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
60k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
750
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.5k
Statistics for Hackers
jakevdp
799
230k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
590
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
300
Digital Ethics as a Driver of Design Innovation
axbom
PRO
2
520
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Tell your own story through comics
letsgokoyo
1
1.1k