Umakanta Sahoo
iOS Team @THBS
Why use Cora Data ?
Efficiency
Managed Object
Managed Object Context
Data storage
Modeling Data
Managed Object
The individual data obj in your class represented by a class NSManagedObject
Managed Object Context
- Core Data's scratch pad of your projects
- tracks changes to modal properties
- handles actions on your data
- central point we work with, when we will do all things
Data storage
Persistent Store Coordinator: database connection.
- Here’s where you set up the actual names and locations of what databases will be used to store the objects, and any time a managed object context needs to save something it goes through this single coordinator.
ManagedObjectModel describes
all these obj
→ Entity
→ relationship
We can define behavior with this object.
It use all these information in a managedObjectModel to create a store file.
how you access and save data
Flexible and powerful
very simple to use. All you have to decide what to fetch, where to fetch from and how you want to brought back to code
There are bunch of ways how you can fetch
Faulting :
Aggregates :
Working with UI Kit
Threading
practicing safe object ownership
Core data uses a policy of isolation
- one managedObject per thread
- never pass managedObject between threads
- be careful passing data between thread
- Prefer object-id if you pass anything