Master Data vs NSFileManager

Problem:

I have been using my own cache system with for some time now NSFileManager. Usually I get JSON data, and I just save the dictionary directly to the cache (in the Documents folder). When I need it, I'll just go. I also implement, sometimes when I feel better, NSDictionaryin the root folder with the keys / values ​​for the path for this resource. For instance:

The weather resource is in Geneva on 02/17/2013, so I will have a key called GE_17_02_2013 and the value is the path to NSDictionarythe information.

Usually I do not need to perform complex queries. But somehow, and from what I read when you have a lot of data, you should stick to Core Data. In my case, I usually have a lot of data, but I never felt that the application was going down or suffering in terms of performance. So my questions are:

  • In this case, when sometimes (the weather was just an example) I just need to delete all the data (Twitter channel, for example) and replace it with a completely new data stream, is Core Data worth it? I think that deleting all the data and inserting (filling) it is harder than just saving NSDictionaryand replacing the old one.

  • Sometimes it will include images, text files, etc. and    NSFileManagerdoes it perfectly, so what benefits can Core Data have in these cases?

PS: , , , . , .

+5
2

. , , , , , Core Data. , :

  • , , , ( ). , , . , , , , , , , .
  • , ( , ).
  • 80% . , - , willSave .
  • cascade
  • , , , .
  • , , , .
  • . ( )
+2

... ?

, , - , . Core Data SQL, - , . , NSKeyed(Un)Archiver / .

, () , NSDictionary .

, . . Core Data , . ? . , . ? , , - , , . , , , , .

, .. NSFileManager , ?

, . ( , Core Data ), Core Data . , ( ). , , , LevelDB , , , .

+1

All Articles