Reputation: 635
I'm really to new to iOS development. I've read through a couple of beginners books, and am currently going through the Standford course offered through iTunes.
I'm just a beginner, but I'm really particular about learning things correctly from the start. A lot of what I've learned through books or online doesn't seem to adhere to "best-practices" - which I understand, best-practice may be beyond the level of what's currently being taught, but I still hate learning things that are wrong only to have to relearn them later.
I was hoping that someone could offer me some advice on how to correctly store data in an app. That is, if I'm dynamically generating table cells from an array or dictionary what's the best way to store the data that array or dictionary came from?
If I were, say, displaying a list of articles via a table, and I'd like to be able to easily update that list with an app update at some point I'm assuming I wouldn't want to hard-code that list directly into a model, but get that data from elsewhere.
The examples I've learned from all show the use of plists, but then say that you would never actually do this with a plist in a real application. I'm not looking for how to do what I'm asking, just hoping that someone can point me in the right direction... Like, would you use SQLite?.. would it be best to parse a web source if your content was coming from the net?
I'm just trying to figure out the best way to do it. I realize there's no real "best" way to do it, but I've noticed a huge difference between sample code I see from some tutorials on the net and sample code from Apple - maybe I'm wrong, but I'm assuming Apple's code samples are well-written code.
Upvotes: 1
Views: 240
Reputation: 23438
Some common approaches are:
Realistically, you'll need to read up on the various solutions - they all have pros and cons, and those pros and cons will weigh differently depending on your needs.
Upvotes: 3