Book Image

Getting Started with Twitter Flight

By : Tom Hamshere
Book Image

Getting Started with Twitter Flight

By: Tom Hamshere

Overview of this book

<p>Flight is a lightweight, component-based JavaScript application framework developed by Twitter for Twitter.com. It is an exciting alternative to the complexities of modern MVVM frameworks, offering a minimal API that allows you to write fast, reliable, scalable applications with a minimum of boilerplate code.</p> <p>Getting Started with Twitter Flight offers the reader insight into why Flight was created and how to use it to build performant, powerful web apps from a unique perspective – that of someone who has had the opportunity to work directly with the team that created it. From a basic knowledge of JavaScript and jQuery, you will explore every aspect of Flight through practical examples and detailed explanations.</p> <p>Learn what separates Flight from other frameworks, why Flight was created, and why you should use it in your next project. Discover the power of Flight’s component-based architecture and use mixins, an exciting alternative to class-based inheritance, to create templating systems and data storage layers.</p> <p>Getting Started with Twitter Flight provides all you need to know to build everything from UI widgets to large-scale, data-driven applications.</p>
Table of Contents (22 chapters)
Getting Started with Twitter Flight
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Scaffolding a Flight application with Yo


Yeoman is a workflow for modern web apps. It includes Yo, a system that allows a developer to write generators which can create scaffolds for applications and packages with a single command. Yo generators have been created for a wide variety of structures such as jQuery plugins, Node servers, and (of interest to us) Flight applications.

The Flight generator (created by Nicolas Gallagher) can scaffold out Flight applications, components, mixins, and standalone packages in a matter of seconds. It even sets up a test runner using Karma and Jasmine Flight . We'll look at testing Flight in detail in Chapter 12, Testing.

Installing Yo

Yo uses Node.js and the Node Package Manager (NPM) to operate. Follow the installation instructions at http://nodejs.org/. The Flight generator requires Bower, a JavaScript package manager.

Tip

If you are working with other projects that depend on the older version of grunt, you can use the Node Version Manager (NVM) to install...