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
Leaving jsps in the dust
Search
Veena Basavaraj
June 30, 2012
Technology
430
2
Share
Leaving jsps in the dust
LinkedIn moving to client templates for the web
Veena Basavaraj
June 30, 2012
More Decks by Veena Basavaraj
See All by Veena Basavaraj
Dust and web-performance at LinkedIn
vybs
1
210
CuriousCaseOfDust.pdf
vybs
1
300
Other Decks in Technology
See All in Technology
Diagnosing performance problems without the guesswork
elenatanasoiu
0
150
Dynamic Workersについて
yusukebe
2
560
APIテストとは?
nagix
0
170
先取りMaven4 ~16年ぶりのメジャーアップデート、その進化とは?~
ogiwarat
0
120
Datadog 認定試験の概要と対策
uechishingo
0
220
JJUG CCC 2026 Spring AI時代の開発こそ標準化を武器に! ― 方式・プロセス・プラットフォームの標準化
s27watanabe
2
660
価格.comをAI駆動で全面刷新する ー 30年分の技術的負債を返し、次の30年の土台をつくる ー
tkyowa
1
710
Mastering Ruby Box
tagomoris
3
130
BigQuery の Cross-cloud Lakehouse への歩み
phaya72
2
330
製造業のクラウド活用最適解〜AI,DXを加速するデータ基盤の作り方〜
hamadakoji
0
260
サプライチェーンセキュリティの空白地帯 - 信頼できる”依存性”の未来を考える
rung
PRO
2
620
AI フレンドリーなエラー監視を TypeScript で実現する
shinyaigeek
2
210
Featured
See All Featured
How to Talk to Developers About Accessibility
jct
2
210
Mind Mapping
helmedeiros
PRO
1
220
The World Runs on Bad Software
bkeepers
PRO
72
12k
Facilitating Awesome Meetings
lara
57
6.9k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.3k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Believing is Seeing
oripsolob
1
140
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
310
Transcript
Leaving jsps in the dust @vybs
We are pi@linkedIn
front-end infrastructure
Goal(s)
In the beginning... Site-Speed Site-Scale +
What is the Problem?
But... Site-Speed Site-Scale Developer Velocity
Simple things should be dead easy
Build Quick, Iterate More
front-end infrastructure now became....
Static Vs Dynamic Jruby Node.js Grails
Anyone notice a bad pattern?
Do once, Do the same twice, Do the same thrice...!
How does this work effectively in mobile?
Still building heavy pages not apps
We created a few more problems indeed!
How did we solve them?
Unification • Javascript Templates, CDN caching • Write once •
JSON for data • One Standard • Event-ed Server as JSON Aggregator + JS V8 engine • Scale once
JavaScript templates • Evaluated tons, handlebars, dust, mustache • Good:
Simple, less logic, 4KB, precompiled to javascript, performance is a feature • Bad: None are mature enough, i18n/ formatters not out of the box
_t = “Hello {name}! You have {count} new messages from
{#people} {name}, {/people} ”; json = { "name": ”James", "count": 2, “people” : [{ “name” : “Jim”, “distance” : “2” },{ “name”: ”Eran” “distance” : “1”} ] } Hello James! You have 2 new messages from Jim, Eran! !dust.render(_t, json, function(error, data) {! $(“mydiv”).html(data);! }!
Dust - *less logic • Simple, DRY • loops, conditionals,
partials, inheritance {#people} {>”/path/degree_icon_{distance}”/} {/people}
Dust • Client Helpers for extensions, reusability • Rendering logic,
math, i18n • @if, @select, @lte, @ceil, @i18n, @form {#people} <li class="card {@select key=“distance”} {@lte value=“1”/} {@i18n text=“first degree”/} {@gt value=“1”/} {@i18n text=“second degree”/} {/select} </li> {/people}
! on client • Server side precompiled to JS •
Rendering times on client snappy
! on client • Server side processed helper tags •
auto-generate template dependencies {#people} {“>degree_icon”/} {/people}
! on client • Dust Preprocessed helper tags • leverage
JVM based i18n, formatting and A/B testing • creates template driven, context based JSON {#people} {@ss.fmt key=”fmt_name” type=“name” value=”{name}”/} {/people} {#people} {fmt_name} {/people} Client template/ js “people” : [{ “name” : “Joe Jada”, “fmt_name” : “Joe J”, “distance” : “2” },{ “name”: ”Jade Pink” “fmt_name” : “Jade P”, “distance” : “1”} ] } Server Source template uses
! on client • No javascript, SEO pages • Seamless
rendering of dust on the server using V8
data layer JSON JSON Browser UI /JSON Aggregator V8 Page
apps Module Module JSON CDN caching content delivery Static Assets static content js, css, templates linkedin.com
linkedin.com/people/pymk
we dust! https://github.com/linkedin/dustjs https://github.com/linkedin/Lu https://github.com/linkedin/inject