Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core Data: Overkill for simple, static UITableView-based iPhone App?

I have a rather simple iPhone app consisting of numerous views containing a single, grouped table view. These views are held together in navigation controllers which are grouped in a tab bar. Simple stuff.

My table views do little more than list text (like "Dog", "Cat" and "Weasel") and this data is being served from a collection of plists. It's perhaps worth mentioning too that these tables are 'static' in the sense that their data is pre-determined and will only ever be amended—and if so, very rarely indeed—by the developer (in this case, moi).

This rudimentary approach has reached its limits though, and I think I'm going to need something a bit more relational. I have worked a tad with Core Data in the past, but only with apps whose data is determined by user input.

I have four closely related questions:

  1. Is Core Data overkill for an app consisting mainly of a selection of simple table views?
  2. Do you recommend using Core Data to manage data which is predetermine and extremely unlikely to ever change?
  3. Can one lock Core Data down so that its data can't change, thereby relinquishing my responsibility as the developer to handle the editing and saving of the managed object context?
  4. How do I go about giving Core Data my predetermined data, and in a format I know that it can work with?

Thanks a bunch guys.

like image 376
David Foster Avatar asked Apr 02 '26 06:04

David Foster


1 Answers

The answer is simple. If you do not need to persistent to an out of date format (like MSWord, etc.) then you should be using Core Data. Raw SQLite is a headache that is not worth the effort 99.999% of the time.

Core Data is more efficient than plists and allows greater flexibility if the project ever evolves.

It is also very easy to pre-populate a Core Data sqlite file using a OS X machine; you know, the machine you are using to develop your application in the first place :)

NNW's use case is a singular exception to this rule that, if I were a betting man, I would bet has the Core Data team's attention and will be corrected in a future update. An update, by the way, that you will get for free if you use Core Data.

like image 190
Marcus S. Zarra Avatar answered Apr 03 '26 21:04

Marcus S. Zarra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!