SlideShare uma empresa Scribd logo
1 de 37
A Core Data Journey
Who Am I?
• Alex Terente
• Mainly iOS developer
• Consultant and working @
TAGonSoft
• alex.terente@TAGonSoft.ro
What is Core Data?
“The Core Data framework
provides generalized and
automated solutions to common
tasks associated with object life-
cycle and object graph
management, including
persistence.”
What is Core Data?
• Allows definition of Managed Objects
• Functionality to create, update,
delete, query
• Multiple back-end storage options
Storage Options
• Binary
• In-memory
• XML
• Not available on the iPhone
• SQLite
• Only option that does not require the
entire store to reside in memory
What is not Core
Data
• Core Data is not a relational
database or a relational database
management system
• Core Data is not a silver bullet.
Core Data vs. SQLite
SQLite Core Data
Bulk/Set
Operations
Yes No
Automatic object
population
No Yes
Custom SQL Yes No
Select only
certain fields
Yes No
Automated
Migrations
No Yes
Less Complex
Code
No Yes
Interface to Core
Data
NSPersistentStore
NSPersistentStoreCoordinator
NSManagedObjectContext
NSPersistentStoreCoordinat
or
NSManagedObjectModel
Model Demo
NSManagedObjectConte
xt
Inserting an Object
Querying for Objects
Deleting an Object
Updating an Object
• Same as insert
• Make changes followed by
ManagedObjectContext save
Save Context
Code Demo
Migration
• Lightweight Migration
• Model versioning
Lightweight migration
• Adding or removing entity, relation or
attribute
• Making attribute non optional
• Making non optional attribute
optional
• Renaming an atribute or entity
Lightweight migration
Model Versioning
Model Versioning
Model Versioning
Code Demo
Threading
• Must create a new
NSManagedObjectContext for each
thread
• NSManagedObjects are
associated with a particular context
• NSManagedObjectContext can be
updated with changes from other
contexts
Code Demo
Core Data and iCloud
• Enabling
• Add iCloud Persistent Store
Enabling iCloud
Enabling iCloud
iCloud Persistent
Store
Resources
• Core Data Programming Guide
• Core Data Model Versioning and
Data Migration
• iCloud Programming Guide for Core
Data
• iCloud Design Guide
• Code Sample
https://github.com/TAGonSoft/CoreD
ata_CodeCamp
Q & A
Thank You
Please feel the evaluation form
A Core Data Journey
Alex Terente
TAGonSoft.com
A CoreData Journey
A CoreData Journey

Mais conteúdo relacionado

Mais procurados

Mais procurados (9)

Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014Datomic – A Modern Database - StampedeCon 2014
Datomic – A Modern Database - StampedeCon 2014
 
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
DEV-1129 How Watson, Bluemix, Cloudant, and XPages Can Work Together In A Rea...
 
EF6 and DDD
EF6 and DDDEF6 and DDD
EF6 and DDD
 
Dev ops-presentation
Dev ops-presentationDev ops-presentation
Dev ops-presentation
 
Entity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NETEntity Framework Core 2.1: Simple, Powerful Data Access for .NET
Entity Framework Core 2.1: Simple, Powerful Data Access for .NET
 
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages  NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
NoSQL Now! Webinar Series: Innovations in NoSQL Query Languages
 
The power of datomic
The power of datomicThe power of datomic
The power of datomic
 
Lift web framework
Lift web frameworkLift web framework
Lift web framework
 
Implementing DDD Concepts in PHP
Implementing DDD Concepts in PHPImplementing DDD Concepts in PHP
Implementing DDD Concepts in PHP
 

Destaque

Destaque (12)

Core Data in Motion
Core Data in MotionCore Data in Motion
Core Data in Motion
 
16 CoreData
16 CoreData16 CoreData
16 CoreData
 
Things you might have missed from CoreData
Things you might have missed from CoreDataThings you might have missed from CoreData
Things you might have missed from CoreData
 
REST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A TourREST/JSON/CoreData Example Code - A Tour
REST/JSON/CoreData Example Code - A Tour
 
iOS Beginners Lesson 3
iOS Beginners Lesson 3iOS Beginners Lesson 3
iOS Beginners Lesson 3
 
Core Data without headaches
Core Data without headachesCore Data without headaches
Core Data without headaches
 
Rainer Grimm, “Functional Programming in C++11”
Rainer Grimm, “Functional Programming in C++11”Rainer Grimm, “Functional Programming in C++11”
Rainer Grimm, “Functional Programming in C++11”
 
CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!CoreData - there is an ORM you can like!
CoreData - there is an ORM you can like!
 
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating PresentersWhat Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
What Would Steve Do? 10 Lessons from the World's Most Captivating Presenters
 
How Google Works
How Google WorksHow Google Works
How Google Works
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Semelhante a A CoreData Journey

Google App Engine - exploiting limitations
Google App Engine - exploiting limitationsGoogle App Engine - exploiting limitations
Google App Engine - exploiting limitations
Tomáš Holas
 
SeaJUG May 2012 mybatis
SeaJUG May 2012 mybatisSeaJUG May 2012 mybatis
SeaJUG May 2012 mybatis
Will Iverson
 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects Optimization
WO Community
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
Toby Samples
 

Semelhante a A CoreData Journey (20)

Data Ingestion Engine
Data Ingestion EngineData Ingestion Engine
Data Ingestion Engine
 
Data Modeling for NoSQL
Data Modeling for NoSQLData Modeling for NoSQL
Data Modeling for NoSQL
 
Google App Engine - exploiting limitations
Google App Engine - exploiting limitationsGoogle App Engine - exploiting limitations
Google App Engine - exploiting limitations
 
SeaJUG May 2012 mybatis
SeaJUG May 2012 mybatisSeaJUG May 2012 mybatis
SeaJUG May 2012 mybatis
 
Qardio experience with Core Data
Qardio experience with Core DataQardio experience with Core Data
Qardio experience with Core Data
 
Schema less table & dynamic schema
Schema less table & dynamic schemaSchema less table & dynamic schema
Schema less table & dynamic schema
 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects Optimization
 
Hibernate in XPages
Hibernate in XPagesHibernate in XPages
Hibernate in XPages
 
In Memory Databases: A Real Time Analytics Solution
In Memory Databases: A Real Time Analytics SolutionIn Memory Databases: A Real Time Analytics Solution
In Memory Databases: A Real Time Analytics Solution
 
Data modeling trends for analytics
Data modeling trends for analyticsData modeling trends for analytics
Data modeling trends for analytics
 
Architecting a datalake
Architecting a datalakeArchitecting a datalake
Architecting a datalake
 
Data Lakehouse, Data Mesh, and Data Fabric (r1)
Data Lakehouse, Data Mesh, and Data Fabric (r1)Data Lakehouse, Data Mesh, and Data Fabric (r1)
Data Lakehouse, Data Mesh, and Data Fabric (r1)
 
Data Lakehouse, Data Mesh, and Data Fabric (r2)
Data Lakehouse, Data Mesh, and Data Fabric (r2)Data Lakehouse, Data Mesh, and Data Fabric (r2)
Data Lakehouse, Data Mesh, and Data Fabric (r2)
 
Entity API in Drupal 8 (Drupal Tech Talk October 2014)
Entity API in Drupal 8 (Drupal Tech Talk October 2014)Entity API in Drupal 8 (Drupal Tech Talk October 2014)
Entity API in Drupal 8 (Drupal Tech Talk October 2014)
 
Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORMKilling Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
 
Why we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL DatabaseWhy we love ArangoDB. The hunt for the right NosQL Database
Why we love ArangoDB. The hunt for the right NosQL Database
 
JavaOne_2010
JavaOne_2010JavaOne_2010
JavaOne_2010
 
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
1. SQL Server forSharePoint geeksA gentle introductionThomas Vochten • Septem...
 
Survey of Big Data Infrastructures
Survey of Big Data InfrastructuresSurvey of Big Data Infrastructures
Survey of Big Data Infrastructures
 
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Entities in Drupal 8 - Drupal Tech Talk - Bart FeenstraEntities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
Entities in Drupal 8 - Drupal Tech Talk - Bart Feenstra
 

Último

Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Cara Menggugurkan Kandungan 087776558899
 

Último (6)

Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
 
Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312Mobile App Penetration Testing Bsides312
Mobile App Penetration Testing Bsides312
 
Android Application Components with Implementation & Examples
Android Application Components with Implementation & ExamplesAndroid Application Components with Implementation & Examples
Android Application Components with Implementation & Examples
 
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
Obat Penggugur Kandungan Di Apotik Kimia Farma (087776558899)
 
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
Satara Call girl escort *74796//13122* Call me punam call girls 24*7hour avai...
 
Mobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s ToolsMobile Application Development-Android and It’s Tools
Mobile Application Development-Android and It’s Tools
 

A CoreData Journey