Mustache in the Front, Mustache in the Back
summary
Twitter rewrites its front end using mustache.rb and mustache.js to share templates across Ruby and JS, cutting payload by about half compared with server HTML and reclaiming heavy rendering work that once consumed ~12% of CPU. Server-side JS on V8/SpiderMonkey proves impractical, so Ruby renders initial pages and pages embed embedded JSON for client rendering. Internationalization is added with an under_stash extension and a painful camel_Snake normalization is later removed.
AI-written summary · about
chapters (22)
- 0:00Intro
- 1:05Team
- 3:17Simple
- 4:05Interpolation
- 4:27Sections
- 5:31Performance
- 6:28Mustache Everywhere
- 7:00Twitter
- 7:30Euler
- 7:54New Twitter
- 8:10Why Render
- 8:49Speed
- 9:35Language Boundaries
- 10:43JavaScript API
- 12:26Is JavaScript great
- 12:45Accessibility
- 16:01Dstack
- 16:25Share Template
- 16:35View Object
- 18:17View Context
- 19:30View Example
- 26:14Internationalization
related talks
11mMicrotalk: Building a Theme Engine w/ Ruby Mustache
22mJSConf 2015 Andrew Rota
38mThe Front-End Future
33mThe Ruby Racer: Under the Hood
24mReusing your frontend JS on the server with The Ruby Racer and/or Ruby Rhino
34mYour Front End Framework is Overkill - Server Side Javascript w/ Rails
29mThe Front-end Takeover
35mWriting web application in Ruby
