Introduction to BoltJS

BoltJS is a UI framework designed by Facebook to be compact, fast and powerful. It is written entirely in JavaScript and runs in the browser, needing no server backend. While BoltJS can be used in a progressive enhancement approach, it is primarily designed for UIs that are built mostly, if not completely, in the browser.

While it is the aim of the BoltJS project to support as many modern browsers as sensible, it is currently focused on supporting mobile WebKit browsers, with the intention of being the best possible development platform for mobile sites and HTML5 apps.

Built on Javelin

Bolt is built on top of Javelin (, from which it uses the event delegation and class declaration features, as well as various utility methods. This ensures that Bolt does not duplicate code already present in the Facebook codebase, helping it stay lightweight and reuse patterns familiar to Facebook developers.

Modules and CommonJS

Bolt modules are defined using a popular standard called CommonJS, first popularized by the NodeJS community. This ensures that each module is completely self contained, with no global variables being created. CommonJS has been integrated with Haste on the server side, and so is also very easy to deploy in a non-mobile app context. Common JS Module Specification

Complex Widgets Made Simple(r)

Bolt makes it very simple to composite many different widgets together, lay them out in a reliable fashion, listen to their events and synchronize their data models. This is achieved using