Your SlideShare is downloading. ×
0
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Pune-Cocoa: Core data - I
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Pune-Cocoa: Core data - I

290

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
290
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Legacy databases can be easily wrapped in EOF
  • Legacy databases can be easily wrapped in EOF
  • NSManagedObjectModel has references to zero or more NSEntityDescription objects. Each NSEntityDescription has references to zero or more NSPropertyDescription objects. NSPropertyDescription is an abstract class with three concrete implementations This small set of classes is enough to define any object model you will use when working on your Core Data projects.
  • Transcript

    • 1. Core Data – I
    • 2. • History• Fundamentals• Under the Hood• Demo
    • 3. Enterprise ObjectFramework
    • 4. History -wiki• Early 1990, NeXT created an Abstraction abovedatabases (DBKit-92)• DBKit failed, in 94 a complete rewrite came asform of EOF (4 people team!) – read only• EOF2.0 in 95 – Context Editing• EOF was useful for WWW and web apps• In 96 first OO webserver WebObjects launchedwith EOF at its heart• 2005, EOF returns to OSX Tiger as Core Data• June 2009 Released for iPhone OS 3.0
    • 5. EOF -wiki• Database tables are mapped to classes.• Database columns are mapped to classattributes.• Database rows are mapped to objects (or classinstances)• Can leverage inheritance• EO is a class which models a physical orconceptual object in the business domain.
    • 6. Fundamentals
    • 7. What is Core Data –Apple Doc.• Core Data is a schema-driven object graphmanagement and persistence framework.Fundamentally, Core Data helps you to savemodel objects (in the sense of the model-view-controller design pattern) to a file and getthem back again. This is similar to archiving,but Core Data offers much more than that.
    • 8. What is Core Data –Apple Doc.• Provides an infrastructure for managing all thechanges to your model objects. This gives youautomatic support for undo and redo, and formaintaining reciprocal relationships betweenobjects.
    • 9. What is Core Data –Apple Doc.• Allows you to keep just a subset of your modelobjects in memory at any given time. This isespecially important on iOS where conservingmemory is critical.• Allows you to maintain disjoint sets of edits ofyour objects. This is useful if you want to, forexample, allow the user to make edits in oneview that may be discarded without affectingdata displayed in another view.
    • 10. What is Core Data –Apple Doc.• Uses a schema to describe the model objects.You define the principal features of your modelclasses—including the relationships betweenthem—in a GUI-based editor. This provides awealth of basic functionality “for free,”including setting of default values and attributevalue validation.
    • 11. What is Core Data –Apple Doc.• Has an infrastructure for data store versioningand migration. This lets you easily upgrade anold version of the user’s file to the currentversion.
    • 12. Core Data ComponentsUserManaged Object Context(managed object) (managedobject)Persistent StoreCoordinatorStorage Storage Storage
    • 13. InitializationDataModel(.momd)Persistent Sore(sqlite/xml...)ManagedObjectContext
    • 14. In ActionUserCodeNSFetchRequestMOMOCPersistent SoreCoordinatorn1Persistent Sore momd
    • 15. Under the Hood• Core Data applications requires an ObjectModel (NSManagedObjectModel)– Model defines entities (NSEntityDescription)Entities have three kind of Properties(NSPropertyDescription):• Attributes (NSAttributeDescription)• Relationships (NSRelationshipDescription)• Fetched Properties (NSFetchedPropertyDescription)
    • 16. Demo

    ×