Primer:
Facebook's 2k of JavaScript to power (almost) all interactions
Despite having access to advanced JavaScript frameworks, many web developers continue to write very similar boilerplate code to setup AJAX interactions. Facebook, in particular, peaked at nearly one megabyte of JavaScript on its homepage. The team then realized that 90% of our interactions could be boiled down into a very small set of steps: (1) User clicks on a link or submits a form, (2) an AJAX request is sent to the server, (3) some markup is put into the DOM. By framing all interactions in this manner, we have been able to put a small snippet of JavaScript, Primer, at the top of all pages that can listen and wire up these interactions. Built atop plain links and forms, we have created a simple, fast, accessible way to implement most interactions on our site. The talk will include a breakdown of the various Javascript techniques (event handlers, asynchronous loading of JavaScript files, etc.), server side integration, metrics gathering, and future work to build our AJAX pageload systems on top of Primer.
About
Born in Ibadan, Nigeria, my family moved around when I was a child. We finally settled in Louisville, KY. I have a computer science degree from MIT. I am a software engineer at facebook in sunny, sunny Palo Alto. I once ran track. I can jump high and far. Swimming is not my forte. People say I smile a lot.