On 09/28/2015 01:30 PM, David Rajchenbach-Teller wrote: > Out of personal curiosity, how long did the rewrite take? How do you > feel about the quality of the new code? Do the NGA and/or Service > Workers help keeping things cleaner?
>From my perspective as module owner of the Music app (and someone who has experience with both the old and the new versions of the app), I think the main benefit of NGA is that it let us make a clean break with the bad decisions of our past. It wasn't very long ago that our code was all supposed to be contained in a single Javascript file, and the old Music app never fully recovered from that decision. As Justin mentions, the Player view was extremely complex, but I don't think that fixing it *required* us to move to NGA; indeed, I did some significant cleanup before NGA to make the migration easier (specifically, pulling out the playback queue management). A bit more cleanup like that, and the old player would probably have been in a really good state. The database backend was a similar case; we were able to copy it wholesale from the old app, but only because we'd spent time pre-NGA cleaning up the code. In fact, for the database, I think Service Workers specifically made some things *harder*. One nice feature of the old Music app was that we displayed results as we enumerated over them from indexedDB. Now, we have to wait until the entire query is finished so we can send the results back in one chunk. I've seen some talk that further enhancements to Service Workers will resolve this, but I'm not sure how soon we'll have it. It also remains to be seen how badly this will affect performance. There are certainly some nice platform features in NGA, like web components (which I've been waiting for ever since I used XBL in XUL). However, I don't think any specific platform feature made the NGA app better. These features provide us some new ways to do things, but on a high level, they're things we should have been doing already. I think it would be unwise to treat any part of the technology as the reason the NGA Music app is better. It was the people working on it. - Jim _______________________________________________ dev-fxos mailing list [email protected] https://lists.mozilla.org/listinfo/dev-fxos

