NSIncrementalStore Journey To The Center Of Core Data C e m - - PowerPoint PPT Presentation

nsincrementalstore
SMART_READER_LITE
LIVE PREVIEW

NSIncrementalStore Journey To The Center Of Core Data C e m - - PowerPoint PPT Presentation

NSIncrementalStore Journey To The Center Of Core Data C e m F l i g ? Jonathan Penn CocoaConf PDX August, 2013 @jonathanpenn Goals 1. Understand Core Data 2. Explore A Non-trivial Problem Slides n


slide-1
SLIDE 1

NSIncrementalStore

Jonathan Penn CocoaConf PDX • August, 2013

C  e  m  F  l  i  g ?

Journey To The Center Of Core Data

slide-2
SLIDE 2

@jonathanpenn

slide-3
SLIDE 3

Goals

  • 1. Understand Core Data
  • 2. Explore A Non-trivial Problem
slide-4
SLIDE 4

Slides ‘n Sample Code

cocoamanifest.net/features

slide-5
SLIDE 5

...

slide-6
SLIDE 6

Object Graph

Mmmm, goodies!

slide-7
SLIDE 7

For example...

slide-8
SLIDE 8
slide-9
SLIDE 9
slide-10
SLIDE 10

ROOT

slide-11
SLIDE 11 ROOT
slide-12
SLIDE 12

What if we only care about this portion?

ROOT
slide-13
SLIDE 13 ROOT

“Virtual Memory”

slide-14
SLIDE 14

. . .

NSArray *results = [context executeFetchRequest:request ...]; // ... JournalEntry *entry = results[3]; cell.textLabel.text = entry.name;

Fault

slide-15
SLIDE 15

Fault

NSArray *results = [context executeFetchRequest:request ...]; // ... JournalEntry *entry = results[3]; cell.textLabel.text = entry.name;

. . .

slide-16
SLIDE 16

Context Model

store

( )

StoreCoordinator

The Core Data Stack

slide-17
SLIDE 17

?

NSInMemoryStoreType NSBinaryStoreType NSSQLiteStoreType PlistIncrementalStoreType

slide-18
SLIDE 18

SAUSAGE...HOW IS IT MADE?

slide-19
SLIDE 19

Using A Custom Store Life Cycle Of A Fetch Request Validating And Saving Data Notifying For Changes

PlistIncrementalStore

slide-20
SLIDE 20

[ insert demo here ]

slide-21
SLIDE 21

Generate NSMangedObjectIDs Interpret fetch request criteria Save attributes to *whatever* Load to NSIncrementalStoreNodes

Incremental Stores

slide-22
SLIDE 22

AFIncrementalStore

github.com/AFNetworking/AFIncrementalStore

Secure Incremental Store

www.stoeger-it.de/en/secureincrementalstore/

Other Examples

slide-23
SLIDE 23

@jonathanpenn

Thanks!

cocoamanifest.net

(and please feedback)