Mobile
- Small, personal computers
- Network
- Different interaction model
Web app
- Single page
- Transitions instead of page reloads
- Limited deep linking, more personal state than shared
Constraints
- Latency
- Modest computing power
- Slow storage
- Battery consumption
Native vs web
- Both local UI. Java, ObjectiveC, or Web
- Access to platform APIs
- Excuse to spend money/attention on experience
- Leverage web and use wrappers, phonegap
- FirefoxOS: platform APIs and web.
Web vs store distribution
- Web: less platform API access, better terms, less user assurance
- Store: better platform API access, worse terms, better user assurance
Specific tech
- Related via work on email app in Gaia/FirefoxOS
Startup performance
- Use local UI
- Use local data
- Bundle, delay loading
Local data
- IndexedDB. Funky. IDBWrapper, lawnchair, shim iOS
- localStorage. Profile
- Cookies! Keep API on other domain
- local save + innerHTML: fast restore
Runtime performance
-
Web Workers, help with scroll perf
- Limit DOM
- Use CSS transitions/GPU, transition: transform, translateX
- Cooperatively multitask (setTimeout, setImmediate)