objective c - Working with data in iOS Apps (What to choose? NSData, CoreData, sqlite, PList, NSUserDefaults) -


when develop iphone app (time tracker, todolist etc) never know whats best way deal data. once used plist, next time sqlite or coredata.

how decide whats best project? (only talking data management)

for example if want develop:

  • time tracker app > plist choice?
  • rss reader app > coredata?
  • photo app > sqlite?
  • email client > ?

for beginner can point me proper directions? (i know depends lot on app , thought help)

i'm far away developing complicated apps, still pretty simple.

thanks help, marc

you can use these rules of thumb decide storage model work app.

  • if data fits in memory entirely , relatively unstructured, use plist
  • if data fits in memory entirely , has tree-like structure, use xml
  • if data not fit in memory , has structure of graph, , app not need extraordinary query capabilities, use core data
  • if data not fit in memory, has complex structure, or app benefits powerful query capabilities provided relational databases, use sqlite
  • if data must secret (e.g. password), use keychain.

note these choices overlap, because multiple storage models fit same app. final decision depends on personal preferences - pick technology understand better.

there very question sqlite vs. core data on stack overflow, may want read through answers question.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -