Lessons Learned From Applications That Kicked Titanium's Ass

2,077 views

Published on

from the first

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,077
On SlideShare
0
From Embeds
0
Number of Embeds
23
Actions
Shares
0
Downloads
18
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Most students cannot read slides while listening to a presenter. Make your presentation as visually graphic as possible.
  • Lessons Learned From Applications That Kicked Titanium's Ass

    1. 1. Lessons Learned<br />from apps that kicked Titanium’s ass<br />Kevin Whinnery<br />@kevinwhinnery<br />
    2. 2. Agenda<br />Some Cool Titanium Applications<br />Problems we saw (and how we fixed them)<br />Titanium application structure: CommonJS modules and Custom Components<br />Demo and code walkthrough<br />Q&A<br />
    3. 3. Some Cool Titanium Applications<br />NBC iPad Application<br />Late Night with Jimmy Fallon<br />GetGlue<br />Wunderlist<br />Many many more<br />
    4. 4. Awesome!<br />…but they also kicked our ass…<br />
    5. 5. Big Apps, Big Problems<br />Cross-platform concerns<br />Memory Management<br />Slow initialization times<br />Multiple Contexts<br />Code Structure<br />
    6. 6. Cross-Platform Concerns<br />“Write Once, Run Everywhere” fallacy<br />Cross-Platform API Parity<br />Cross-Platform functional differences<br />
    7. 7. Solutions<br />Cross-Platform Concerns<br />
    8. 8. “WORE” Fallacy<br />Don’t aim for 100% code re-use, because it’s not going to happen (not even on the web)<br />For many apps, you can get by with branching logic<br />For complex experiences, re-use components, not your entire set of UI code<br />Custom components offer the best cross-platform re-use<br />If your app is made up of small chunks, each chunk will be easier to maintain cross-platform<br />
    9. 9. Cross-Platform Parity/Compatibility<br />Probably the most annoying thing about our platform<br /> - We’re writing specs to drive testing/implementation for 2.0<br />- First spec implementation will be with layouts in 1.8<br />Cross-platform testing essential<br />Should plan on platform differences, however – check NavigationController demo for one example<br />
    10. 10. Memory Management<br />No explicit memory management API<br />Lots of views (images especially) === lots of memory<br />Unsure when Titanium cleans up<br />
    11. 11. Solutions<br />Memory Management<br />
    12. 12. How to make Titanium clean up<br />Close windows<br />Set object references to null<br />Don’t keep “fat” views in the view hierarchy (images)<br />
    13. 13. Slow initial load times<br />App loads up too slowly<br />Windows open too slowly (windows with URLs)<br />
    14. 14. Solutions<br />Slow load times<br />
    15. 15. Dealing with slow load times<br />JavaScript evaluation is the slowest part of your application<br />Defer script loading until absolutely necessary<br />Don’t load the same script over and over again in a context<br />
    16. 16. Multiple Contexts <br />Kitchen Sink model<br />Data sharing is hard<br />When was code run?<br />
    17. 17. Solutions<br />Multiple contexts<br />
    18. 18. Dealing with multiple contexts<br />Don’t<br />Custom events<br />Properties API for data transfer<br />
    19. 19. Code Structure<br />app.js – not very much structure<br />folder structure?<br />MVC?<br />MVVM?<br />
    20. 20. Solutions<br />Code Structure<br />
    21. 21. Code structure<br />Many ways to skin that cat<br />Appcelerator will have a more formal solution soon<br />Your best bet is to build a suite of components<br />Demo/Code Walkthrough<br />
    22. 22. Q&A<br />Questions and Answers<br />
    23. 23. Contact<br />Kevin Whinnery<br />@kevinwhinnery<br />kevin.whinnery@gmail.com<br />
    24. 24. Thank you!<br />

    ×