We’ve had a lot of questions about what’s powering our new interface, so here’s a brief rundown:
React
Everything inside the <body>
tag is rendered with React components.
We tried a lot of JS frameworks and libraries to help us make the UI more dynamic. The one that fit best was React. It provides a powerful way to make reusable components and the one-way data flow makes a lot of sense. With React, our code is understandable, small, and fast.
Backbone.Router
React doesn’t have anything for routing. We tried a bunch of these as well and settled on Backbone’s router. It’s simple, it works.
d3
We are using d3 to render our charts. d3 is pretty amazing. We’re using maybe 1% of its API, but were able to replicate our hand-coded server-drawn charts quite easily.
IcedCoffeeScript
We wrote some async JS code by hand a while back to get a bunch of datasets and split them up into a timeframe for a chart. Then we came back to it and had no idea how it worked. IcedCoffeeScript makes asynchronous JavaScript a breeze. We replaced our code with a few lines of IcedCoffeeScript and never looked back.
gulp
We use gulp to stitch all this JavaScript together, lint it, minify it, compress it. Then we have a Go app that uploads the bundle to s3/CloudFront, updates an assets file, and HUPs the web servers so they reload the assets file.
» Here’s the gulp plugin we wrote for IcedCoffeeScript
Go
Nothing has changed on the backend, we still use Go for everything. It does a marvelous job with JSON.