Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hogan.js
Search
sayrer
February 01, 2012
Technology
2
1.1k
Hogan.js
Twitter Open Source Summit
January, 31, 2012
sayrer
February 01, 2012
Tweet
Share
Other Decks in Technology
See All in Technology
GAS × Discord bot × Gemini で作ったさいきょーの情報収集ツール
ysknsid25
1
430
.NET のUnified AI Building Blocks 入門...!
okazuki
0
150
ARRが3年で10倍になったプロダクト開発とAI活用の軌跡
akiroom
0
190
50以上のマイクロサービスを支えるアプリケーションプラットフォームの設計・構築の後悔と進化 #CNDW2024 / regrets and evolution of application platform
toshi0607
5
620
RAMP2024
takeyukitamura
3
230
突き破って学ぶコンテナセキュリティ/container-breakout-cncj-lt
mochizuki875
5
240
LINEヤフーにおける超大規模プラットフォーム実現への挑戦と学び / Challenges and Lessons in Building an Ultra-Large-Scale Platform at LY Corporation
hhiroshell
2
940
SONY AITRIOSによるAIエッジセンシングの新たな可能性(仮)
iotcomjpadmin
0
320
GeminiとUnityで実現するインタラクティブアート
hokkey621
0
340
もう一度、 事業を支えるシステムに。
leveragestech
6
3k
RDRAとLLM
kanzaki
4
500
ONNX推論クレートの比較と実装奮闘記
emergent
0
270
Featured
See All Featured
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Navigating Team Friction
lara
183
15k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Music & Morning Musume
bryan
46
6.2k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
Faster Mobile Websites
deanohume
305
30k
Writing Fast Ruby
sferik
627
61k
4 Signs Your Business is Dying
shpigford
181
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
27
2.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
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!