Reputation: 11040
In our application, we currently have the need to store data of different 'modules', completely unrelated. We want to use Core Data for this. As far as I can say, we have a few options:
Additionally, all of these options can be used with a single managed object context or with multiple ones.
What would be the best way to go?
I would tend to use option #1, i.e. separate model description files, separate coordinators, separate contexts, because as said before, the 'modules' are completely unrelated and it would actually be an error if one 'module' did something with entities from another. It is also possible that module data will be versioned / migrated separately / at different times than for other modules, although we have no need / use case for this yet. (I also don't know how CD versioning works, i.e. is some kind of version set for the whole model, or just for each entity separately? If the former, splitting into multiple model could be an advantage).
But maybe using option #1 is too much and overcomplicating / overengineering things, and I should just not care and put all into one bag?
Upvotes: 1
Views: 199
Reputation: 80265
Here is some help for your decision:
Upvotes: 2