I'm excited to use Flight.js in something more than a toy app, and look forward to making it my go-to for organizing jQuery-based client-side code. I think it's a great option for when a full-on single-page app is overkill. It results in easily testable, separate components that communicate via event triggering and listening - basically PubSub.
Sadly this book is the only one on the subject so far. As soon as there's anything else, I'd recommend you not waste your time here. There's simply way too many mistakes to make this anything but a frustrating read. The example app that the book has the reader build seems like it was written by at least two different authors. Components are referred to by different names, the directory structure is referred to differently, and there are numerous mistakes in the usage of multiple APIs, including Flight.js itself. Add to that a shockingly high number of syntax mistakes (and not just missing semicolons - ones that actually break the app), and it's all too clear that there was next to no editorial effort put into this book.
I wish I could recommend something better. In the mean time, if you have easy access to a copy of the book, it's probably worth a skim to get the basic idea of Flight, but you're likely much better off just reading the docs and looking at some online examples.
Rails debuted ten years ago, and its promise of productivity was staggering: build a blog in 15 minutes! Of course, real work is messier than that, but that's the magic of screencasts and tutorials: everything is rehearsed and distilled for maximum pizazz. You skip over all the dead ends and googling, and you're left with a series of clean steps to layer on complexity, and in the end you have a delicious code cake.
This is more of a bran-muffin book.
The example that carries through most of the chapters is a task list, which is such a simple application of CRUD that it's a . In other words, it's not that interesting, and I can already see the interesting parts implemented elsewhere. In [a somewhat unfair] comparison, walks you through building an entire online e-commerce website.
Part of the appeal of Flight is supposed to be that you can compose fairly complex applications from more primitive general-purpose components. You start with components that have a clear set of responsibilities and inputs/outputs, which makes them easy to test and easy to maintain; by using many of these components on a single page, you end up with a whole that is more than the sum of its parts.
I had hoped that this book would lead me through several components like these, and then illustrate how to combine them. The does just that: its example is a webmail app! But no such luck. Late in this book, there's reference to such an example; the author explains how you might componentize TweetDeck, and why a flat structure is better than a nested structure. But the chapter is just a few pages and totally glosses over how the components would actually be linked.
There are a few other really promising or helpful spots in the book; the chapter on testing, for example, is full of useful code. Except, most of it is evidently now available as part of the jasmine-flight project, so it's kind of moot to have it in print. And I was excited to read the chapter on performance... until I found out that it's only three pages, and it doesn't address one of my team's biggest concerns (about how to share templates between the client and the server).
As others have mentioned, the code is also full of errors. I didn't mind those so much, since I could spot them, and I wasn't trying to run the code. But it's still a knock against this book.
To be fair, I know a lot more about Flight now. This is still a good introduction to the philosophy. But I still have so many questions about how it would work in a real app � questions I had hoped that people with intimate ties to the creation and early applications of Flight would have been able to answer.
I think this is the single most comprehensive resource on the Flight framework. I can highly recommend this book, and even more so the Flight framework. I’ve built a number of frontend apps using Backbone, and more recently also Ember.js. But even with the most strict of code overview, have the interdepencies between models and views created a codebase that became harder and harder to maintain yet alone introduce new features into, or simply to move features from one view to another.
Flight is built with those problems in mind, and creating independent decoupled components has been a revelation for me ever since. Also the upcoming Web Components standard, which Google calls the future of the web, is based precisely on the same assumptions. Flight is a great, stable and production proven (twitter.com, tweetdeck.com) framework which fits nicely with this upcoming standard.
The book is short, concise and yet exhaustive and covers all aspects of creating a high quality web app with Flight: from dealing with data, ajax, and even local storage (for when the app goes offline) to using templates to render to the DOM, every aspect is covered. It is clear that the author speaks with experience from working on big web apps, and it is a gem to get these insights served in such a easy to understand manner. Unlike most coding books the author wastes no pages on explaining basic programming, or the basic principles of front end apps. This is greatly refreshing and I have successfully applied the know-how from the book in my new projects using a full stack javascript with a Node backend.
I can highly recommend this book to anyone who has experience with writing JavaScript front end apps using Backbone or the like. I would however not recommend this book for lesser experienced programmers just starting with JavaScript apps (for you I would recommend Single Page Web Applications by Michael Mikowski).
It's not a typical JS web programming library book, but Twitter Flight isn't a typical JS library either.
When I've started reading it, I was pretty sure it won't get more than 1 star in the final rating: until 33% of the book, there was no code sample! Yes, as ridiculous as it sounds (for a web programming book). Author has decided to start with describing how awesome and useful the library is, without any direct proof - yikes! Fortunately, it gets much better later on.
Author's description of Flight is using one simple ToDo-style application as a playground -> it works quite well, because the problems author's facing are RL ones and reader doesn't have any problem with applying those to her/his work, but unfortunately Hamshere doesn't dive into more advances scenarios. That can leave readers who don't have much experience with event-based systems a bit hopeless.
Another aid one could complain about are missing pictures - sometimes it'd be better to actually slap a diagram or two, just two illustrate the flow of events: where are they triggered, where are they dealed with, etc. Otherwise it's just JavaScript code with poor formatting (on Kindle, that has a limited page width).
Anyway, if you're looking for an introduction to Twitter Flight, this book make sense.
Since there are so few books on Twitter's Flight framework (just this one, at last count), there aren't many choices. Luckily, this book is better than its flawed coding samples and lack of editing would make it seem. It covers all of the critical parts of a Flight component and app, and dives into why certain decisions were made in the language. It even discusses performance and best practices, though those were the weakest areas.
Obviously, at under 100 pages of actual text, there was a lot more that could have been included, though Flight itself is small enough that I can't say it detracted from the book's purpose as a whole. In general, resources around Flight are hard to find, so having even this much information in a single book is a positive.
Generally, if you can look past the editing issues, this isn't a bad intro to a promising framework.
I'm mainly fustrated by the code examples. Not only it is difficult for me to read code without syntax highlighting (but I understand it is cheaper to print book without colours), but this book includes also: - messed up indentations - code not matching textual description (like from different narration) - hard to read code with comment before every code line (would be easier with additional empty lines before comments or without so many comments)