This is the first half of the talk given by Lukhnos and Mikimoto Chuang. They talk about how to use open source tools and libraries to integrate mobile client software with server-side services. Some thoughts and best practices are given. The cast study is TapExpense, an iPhone expense tracker. Also featuring their experiences in tackling wacky wifi/3G connections and CSV/XLS formats.
The talk is given at OSDC.tw 2009 on April 19, 2009.
7. Server-side pro’s and con’s
Server is good for LARGE data
But network is slower than you think
Mobile web = just ok to use
But you don’t want to use it every day
Native mobile app FTW
8. Perspective
Mobile computers that happen can make calls
Telephony is not important
Data terminal, data presentation
Limited device versus cloud
9. Client-side problems
Device is limited in every aspect
Display, memory, CPU speed
But response is very fast
Suitable code: UI, data collection, simple computation
10. Mobile app constraints
Slow CPU
Low memory: 64 MB of heap, no swap
So design you app as if you were in 1996 (seriously)
11. Integration considerations
Use lightweight data structure
XML parsing is usually a bad idea (no SOAP, e.g.!)
Stream-able or partially readable format is good
(JSON, CSV, etc.)
12. Wacky connections
Internet should be assumed but not taken for granted
Power management policy is a pain
3G handover
Intermittent connection
Design early: Offline plan, caching policy, resume
mechanism
13. UIRequiresPersistentWiFi UIRequiresPersistentWiFi
<true/> <false/>
Always on, but
idleTimerDisalbed Always on, always
wifi/3G off after 30
YES connected
min
3G/wifi off when
Wifi on when app
idleTimerDisalbed device wants to
is on, but 3G off
NO even when app is
when screen off
on
17. CSV is not simple at all!
Originally: Email to user
Common format, but tons of pain (saving, exporting)
Usability = 0
No way to handle multi-line text
Variants!
Not all spreadsheet app is created equal
Excel, Numbers, OpenOffice
23. LFHTTPRequest
Part of the ObjectiveFlickr project
http://github.com/lukhnos/objectiveflickr/
Targeting both Mac 10.4/10.5/[Redacted], iPhone OS
2.x/[Redacted], 32-bit, 64-bit
Lightweight and robust
24. Other Open Source Libs
Three20
http://github.com/joehewitt/three20
Erica Sadun’s code
http://ericasadun.com/
And more