Core Data without headaches
-
Upload
abraham-barrera -
Category
Technology
-
view
292 -
download
1
description
Transcript of Core Data without headaches
CoreData Love!CoreData Without headaches
About Me@abraham_barrera
iOS Developer
ContinuumLemontech
I LoveMy Family
I LoveMy Girlfriend
I LoveGrand Central
Dispatch
I LoveBlocks!
I hate
I hateWars
I hateStoryboards
I hateCoreData
I hatedCoreData
CoreData Love!CoreData Without headaches
We need Store Data
From scratch
¿CoreData?
PersistenceFramework
¿Persistence?Framework
Not really
end of presentation
ObjectManager
Lifecycle
Search
Relations
Persistence
Persistence
In-Memory
Work in-Memory
Create / Update / Delete
Relations(in-memory)
Relations(no search)
user.profile.description
Users ... ( where ) ..
" profile.name = %@ ", profile.objectID
Users ... ( where ) ..
" profile.name = %@ ", profile.objectID
(No Joins)
CoreData != Database
Objects Manager
vsStore/fetch
Data
In-Memoryvs
On-Disk
Store Objects with behaviors
vsOnly data
Non Transactional
vsTransactional
All operations in Memory
vsOperations
without loading data
5 Base Elements
Model
NSManagedObject
managedObjectModel
persistentStoreCoordinator
managedObjectContext
Model
NSManagedObject
managedObjectModel
persistentStoreCoordinator
managedObjectContext
Save a new Record
Show me the code
Some Issues
Data typesNSManagedObject
Too verbose
Too verbose
Tools
MoGeneratorhttps://github.com/rentzsch/mogenerator
$ brew install mogenerator
mogenerator --model CoreDataInLove/Model/CoreDataInLove.xcdatamodeld/CoreDataInLove.xcdatamodel -O CoreDataInLove/NewModel -M CoreDataInLove/NewModel/Machine --template-var arc=true
Objective-Recordhttps://github.com/mneorr/Objective-Record