Have you heard of Flight by Twitter?
It’s a lightweight, component-based JavaScript framework that maps behavior to DOM nodes. Twitter uses it for their web applications.
Built by the Twitter web team, Flight is distinct from existing JavaScript frameworks that you may be familiar with because this one doesn’t prescribe nor does it provide any particular approach to rending or sending dada to your web app:
It’s agnostic to how requests are routed, which templating language you use or even if you render your HTML on the client or the server. While some web frameworks encourage developers to arrange their code around a prescribed model layer, Flight is organized around the existing DOM model with functionality mapped directly to DOM nodes.
Not only does this obviate the need for additional data structures that will inevitably influence the broader architecture, but by mapping our functionality directly onto the native web we get to take advantage of native features. For example, we get custom event propagation for free by piggy-backing off DOM event bubbling, and our event handling infrastructure works equally well with both native and custom events.
Flight uses ES5-shim and jQuery. You’ll want to make sure you include an AMD implementation such as require.js or loadrunner to get it operation correctly.
The reason this is fascinating to me is because of one thing: Bootstrap
Twitter has created some incredible technology in the past including Bootstrap (which was once called Twitter Bootstrap) – which is a killer front-end framework for faster web development. Some WordPress themes are starting to use it (like Standard Theme).
Watching these incredibly progressive companies create amazing technologies is good for the WordPress community because it’s quite possible that we’ll be able to adopt some of them to better the core and auxiliary WordPress experience.
And who knows how creative some of the WordPress community will be when engaging with these technologies – new plugins, features, functionalities and even impacting design, UI and UX.
I just started digging into Flight this morning and already I’m impressed with the limited demo and beginning to think of creative ways to implement it in my own projects. Decoupling functionality allows a developer to consider each action and component in isolation which ultimately allows for greater freedom and less complexity of an app. I can see some neat functionality and even a simple WordPress plugin that could show this perhaps.
In any case, stoked to see another internal software technology come out to open source. Licensed under MIT it’s going to get a lot of playtime.
1 Comment