PacktLib: Getting Started with Twitter Flight

Getting Started with Twitter Flight

Credits

Foreword

About the Author

About the Reviewers

www.PacktPub.com

Preface

What is Flight?

Who made Flight?

How does Flight work?

Summary

The Advantages of Flight

Simplicity

Efficient complexity management

Reusability

Agnostic architecture

Improved Performance

Well-organized freedom

Summary

Flight in the Wild

Flight at Twitter

Quotes from developers

Open source Flight projects

Extending Flight with two-way data binding

Summary

Building a Flight Application

Scaffolding a Flight application with Yo

Creating custom applications

Using Flight without a module loader

Troubleshooting

Debugging

Summary

Components

What is a component?

Component types

Creating your first component

Summary

UI Components

Attaching components to existing HTML

Listening for browser events

Finding DOM nodes

Modifying the DOM

Summary

Data Components

What is a data component?

Attaching data components

Naming data events

Creating a data component

Listening for UI events

Event handlers

Triggering data events

Completing the task_data component

Error handling

Handling data events

Summary

Event Naming

The importance of event names

Events are not instructions

Suggested naming conventions

Summary

Mixins

What are mixins?

When to use mixins

How do mixins work?

Creating mixins

Using mixins

Mixin priority

Creating your first mixin

Initializing the task list from storage

Extending existing methods

Advice priority for components and mixins

Mixing mixins into mixins

Summary

Templating and Event Delegation

Generating template objects from DOM nodes

Constructing templates in components

Creating a templating mixin

Server-side compilation

Using HTML to determine state

Working with dynamic HTML – event delegation

Adding delegated events to task_list

Summary

Web Application Performance

Reducing time to page load

Server-side rendering

Using the DOM to determine state

Using request type to determine response

Perceived performance

Summary

Testing

What does a test look like?

Testing the interface

Obtaining a reference to a component instance

Instantiating standalone mixins

Triggering browser events

Allowing for refactoring

Testing teardown

Testing component instantiation

Extending Jasmine for Flight

Summary

Complexities of Flight Architecture

The danger of nested components

Creating a flat component structure

Mixins versus components

Summary

Flight API Reference

Flight API Reference

Flight API Reference

Index