Note that there are some explanatory texts on larger screens.

plurals
  1. POCore Data questions around typical usage
    primarykey
    data
    text
    <p>I have some basic questions about core data (which I am new to) and I would like some points of view on current standards and implementations.</p> <p>Basically I have an app on the iPhone (supporting iOS 3.0 and above) which gets a lot of data from web calls over HTTP, Im looking at moving the results into local storage for fast retrieval for the next time the user might load the same data again (the data doesnt change, which is why I can rely on the cached version be accurate).</p> <p>I just wanted to know a few things first:</p> <ol> <li><p>Do people these days treat the managed objects that extend <code>NSManagedObject</code> as domain objects, or do you create seperate classes strictly for storage and create helper methods to create them into domain objects? I sometimes find keep all persistence logic out of the domain to be a good thing.</p></li> <li><p>What about clean up? How does one typically delete all the data when the app closes, or perhaps, expire data in the local storage? I certainly dont want to hold the data on the users phone at all times.</p></li> <li><p>Is there any type of atomicity with Core Data? My implementation will first check for data locally before hitting the web services, I would like to make sure that there is never half a dataset being committed to the local storage and get funny results.</p></li> <li><p>I would like to run a fair few background threads to fetch data in the background, are there any things I would need to consider when persisting objects on a background thread?</p></li> <li><p>In relation to the above question, what is the best way to create a "background fetching" loop? In the app delegate? Per view, depending on the view? etc...?</p></li> </ol> <p>I hope these are not too basic :)</p> <p>Thanks for any help you can give.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload