It becomes increasingly important to keep your JavaScript code structured once you start taking client-side development more seriously, even more so when you make the switch to building single page apps using Rails (either the full stack or just Rails API) for purely JSON responses, letting JavaScript handle the bulk of the client-side rendering. Twitter's [Flight](http://flightjs.github.io/) framework can fly you through the spaghetti code horror by wrapping the behaviour of all your UI elements into modular components that are purely event-driven. This leads to highly decoupled and bug-free code that makes maintenance and testing a charm.
Peppered with real-world code and sprinkled with best practices gained through my experience, this talk will prepare you to start using Flight in your Rails app today.