• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Lessons Learned From Applications That Kicked Titanium's Ass
 

Lessons Learned From Applications That Kicked Titanium's Ass

on

  • 1,658 views

from the first

from the first

Statistics

Views

Total Views
1,658
Views on SlideShare
1,639
Embed Views
19

Actions

Likes
0
Downloads
12
Comments
0

2 Embeds 19

http://swpksi.posco.net 18
http://twitter.com 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • 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 Lessons Learned From Applications That Kicked Titanium's Ass Presentation Transcript

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