Sunday, July 27, 2014

Introducing window.js

Back at Sourcemap, we had a consistently inconsistent problem:  The shape of our tree diagrams could change dramatically depending on the type (and amount) of data being displayed.  This sometimes lead to the embarrassing problem of clients being unable to even find their data on the screen, much less make sense of it.

The solution was to increase the flexibility of our dashboard.  I'm a huge fan of tiling window managers, so I rushed out to make one in JavaScript.

The result was window.js, a tiling manager for web sites.  We hooked it up to our existing visualizations, did a bit of server-side magic to allow saving and loading, and voila-- 100% configurable, resizable, and sharable dashboards.

Check out the live demo here!


A side note:

As an engineer, there are some things in here I'm not proud of.  I didn't quite grok data structures when I set out writing window.js, nor did I quite appreciate the full breadth of functionality of the modern DOM.  

What you see here is a strange hybrid approach where some data is stored directly in the DOM, some in JavaScript objects, and some in closures that may or may not ever be garbage collected.

No comments: