8. iPhoneProcessor
• ~400mhz
processor, 128mb
RAM
• 10 to 100 times
slower processor
and memory
• Premature
optimization takes
on a different
meaning
*
http://www.primatelabs.ca/blog/2007/08/gee
15. Latency Management
• Take latency into account during app design
• Asynchronous operations where anything
takes any kind of time
• Explicitly define wait indicators
• Multithreaded considerations
16. Tools
• Must have an Intel powered Mac
• $99 to join Apple Developer Program
• Free SDK download, Xcode, Objective C, Cocoa
• http://developer.apple.com
19. Objective C
• C with OO added
• Totally different than typical Web Languages
– Pointers
– Memory Management
• No garbage collection
– Non-linear code execution
– Syntactical… saltiness?
• Language features seem years behind
• Biggest burden to new non-Mac developers
27. Web Services REST (amazon)
http://rcm.amazon.com/e/cm?t=[Associates ID goes here]
&l=st1&search=[subject keyword goes here]
&mode=[product line goes here]
&p=102&o=1&f=xml
28. Web Services
• Lightweight approach for mobile is critical
• REST interfaces far more efficient
• JSON for returned data
– Allows you to serialize objects with known data and
types
– Can be 100x faster to parse than XML
– Significantly fewer control characters and other
overhead
– Platform independent, easy to consume
– http://www.json.org
29. Architecture Diagram Web
https; GET websites
Retrieve List of Provide List of
JSON result, [[name,id]…]
Projects Websites
Auth
https; GET websites?id=
Provide Data for
Retrieve Data for
JSON result, [[key,value]…] Website
Project
Edit/Enter
Username and
Password
Local Storage
33. Lay of the Land
• AppDelegate
– (initialization)
• ViewController
– (one per page)
• + XIB
• Data Models
34. Pseudocode
Screen loads
• Controller asks model for data
• Make http request
• Parse JSON (convert it to objects)
• Display data
• Wait for additional events (e.g. button click):
repeat process with new page
35. Pseudocode
Screen loads
Controller asks model for data
• Make http request
• Parse JSON (convert it to objects)
• Display data
• Wait for additional events (e.g. button click):
repeat process with new page
36. Pseudocode
Screen loads
Controller asks model for data
Make http request
• Parse JSON (convert it to objects)
• Display data
• Wait for additional events (e.g. button click):
repeat process with new page
37. Pseudocode
Screen loads
Controller asks model for data
Make http request
Parse JSON (convert it to objects)
• Display data
• Wait for additional events (e.g. button click):
repeat process with new page
38. Pseudocode
Screen loads
Controller asks model for data
Make http request
Parse JSON (convert it to objects)
Display data
• Wait for additional events (e.g. button click):
repeat process with new page
39. Pseudocode
Screen loads
Controller asks model for data
Make http request
Parse JSON (convert it to objects)
Display data
Wait for additional events (e.g. button click):
repeat process with new page
40. Memory Management
• Golden Rule
– If you alloc/init it, you have to release it.
• If you’re returning it from a method, autorelease it.
– If you’re NOT alloc/init’ing it, do NOT release it!
• Mostly…
• Finding leaks
– Use “Instruments” application.
41.
42. Compiling, Testing, Distributing
• Apple developer account required to deploy
to iPhone
• Simulator can be different than actual device
operation, be sure to QA thoroughly
• Be prepared for a lengthy process of
registering, signing, deploying and obtaining
approval for your app
44. Really Like about iPhone Development
• Incomparable/exciting platform
• Standardized hardware, relatively powerful
device
• Cocoa and MVC paradigm
• “Bare metal” programming is a refreshing
change of pace
45. Really Don’t’ Like
• Objective C, iPhone application model
– Lots of assumed knowledge and undocumented rules
to discover
– Refactoring is difficult
• Xcode
– Code editor with GCC config… have come to expect
more
• App deployment
• Flaky connectivity
• Apple controlled domain