Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
iPhone Persistence For Mere Mortals
1. Code and Slides:
http://thillerson.googlecode.com
iPhone Persistence Tony Hillerson
For Mere Mortals Software Architect
Tuesday, March 3, 2009
2. Persistence
Code and Slides:
http://thillerson.googlecode.com
Tuesday, March 3, 2009
3. Persistence
Code and Slides:
http://thillerson.googlecode.com
... or it means saving stuff.
Tuesday, March 3, 2009
4. Persistence: Disclaimer
Code and Slides:
http://thillerson.googlecode.com
BTW: I’m a n00b
Tuesday, March 3, 2009
5. Code and Slides:
http://thillerson.googlecode.com
Persistence: Savin’ stuff on ur fone
Your options
Tuesday, March 3, 2009
6. Persistence: Options
Code and Slides:
http://thillerson.googlecode.com
Settings
SQLite
Filesystem
The Internets
Tuesday, March 3, 2009
7. Persistence: Options
Code and Slides:
http://thillerson.googlecode.com
Settings
SQLite
Filesystem
The Internets
Tuesday, March 3, 2009
8. Persistence: Our Sweet App
Code and Slides:
http://thillerson.googlecode.com
Tuesday, March 3, 2009
9. Persistence: Sweet Codes
http://github.com/thillerson/grocery_getter/
Code and Slides:
http://thillerson.googlecode.com
Download
Tuesday, March 3, 2009
10. Code and Slides:
http://thillerson.googlecode.com
Persistence: Settings
Yours or Apple’s?
Tuesday, March 3, 2009
11. Persistence: Settings
Code and Slides:
http://thillerson.googlecode.com
Apple’s => Settings.bundle
Yours => Roll your own
Both end up in
NSUserDefaults
Tuesday, March 3, 2009
12. Persistence: Settings
Code and Slides:
http://thillerson.googlecode.com
Can be one of:
NSData, NSString,
NSNumber, NSDate,
NSArray, or NSDictionary
Tuesday, March 3, 2009
13. Persistence: Settings
Code and Slides:
http://thillerson.googlecode.com
NSUserDefaults *settings =
[NSUserDefaults standardUserDefaults];
[settings setBool:YES
forKey:@quot;shouldSortAfterCompletequot;];
[NSUserDefaults standardUserDefaults];
[NSUserDefaults resetStandardUserDefaults];
BOOL on =
[settings
boolForKey:@quot;shouldSortAfterCompletequot;];
Tuesday, March 3, 2009
14. Code and Slides:
http://thillerson.googlecode.com
Persistence: SQLite
It’s small, but it’s feisty!
Tuesday, March 3, 2009
15. Persistence: SQLite
Code and Slides:
http://thillerson.googlecode.com
YO DAWG I HERD YOU
LIEK DATA...
Tuesday, March 3, 2009
16. Persistence: SQLite
Code and Slides:
http://thillerson.googlecode.com
SQLite - Embedded Relational
Database written in C
Tuesday, March 3, 2009
17. Persistence: SQLite
Code and Slides:
http://thillerson.googlecode.com
Embedded Relational Database
written in C
Tuesday, March 3, 2009
18. SQLite:
Code and Slides:
Hic Draconae
http://thillerson.googlecode.com
Sunt
CocoaTouch:
Terra Firma
Tuesday, March 3, 2009
19. Persistence: SQLite
Code and Slides:
http://thillerson.googlecode.com
3 Takes on our Sweet App:
• SQLite C API
• fmdb + fmdb-migration-
manager
• Aptiva’s ActiveRecord
Tuesday, March 3, 2009
20. Persistence: SQLite
Code and Slides:
http://thillerson.googlecode.com
SQL C API:
http://www.sqlite.org/c3ref/
funclist.html
Tuesday, March 3, 2009
21. Persistence: SQLite
Code and Slides:
• fmdb - Thin Wrapper around SQLite
http://thillerson.googlecode.com
• fmdb-migration-manager - Rails-style
migrations using fmdb
• http://code.google.com/p/ ycode/
• http://github.com/mocra/fmdb-
migration-manager/
Tuesday, March 3, 2009
22. Persistence: SQLite
Code and Slides:
• Aptiva’s ActiveRecord
http://thillerson.googlecode.com
In software engineering, the active record pattern is a design
pattern frequently found in software that stores its data in
relational databases. It was named by Martin Fowler in his book
Patterns of Enterprise Application Architecture.
- http://en.wikipedia.org/wiki/Active_record_pattern
http://github.com/aptiva/
activerecord/
Tuesday, March 3, 2009
23. Persistence: SQLite
Code and Slides:
http://thillerson.googlecode.com
Quick! To the CODES!
Tuesday, March 3, 2009
24. Code and Slides:
http://thillerson.googlecode.com
Persistence: A Few Points
Take two, they’re small!
Tuesday, March 3, 2009
25. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
Consider how your
settings will be used
Tuesday, March 3, 2009
26. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
A database is an
implementation detail
Tuesday, March 3, 2009
27. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
Encapsulation is your
friend
Tuesday, March 3, 2009
28. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
Don’t forget to move your
database
Tuesday, March 3, 2009
29. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
SQLite write speed is
constrained by
transactions
Tuesday, March 3, 2009
30. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
SQLite uses duck-typing
Tuesday, March 3, 2009
31. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
FMDB:
executeQuery !=
executeUpdate
Tuesday, March 3, 2009
32. Persistence: Tips
Code and Slides:
http://thillerson.googlecode.com
RTFS
Tuesday, March 3, 2009
33. Persistence: Thank you!
Tony Hillerson
Code and Slides:
Software Architect
http://thillerson.googlecode.com
slideshare.com/thillerson
github.com/thillerson
twitter.com/thillerson
brightkite.com/thillerson
EffectiveUI.com
Tuesday, March 3, 2009