Core Data for iOS
Home > Computing and Information Technology > Computer programming / software engineering > Apps programming > Core Data for iOS: Developing Data-Driven Applications for the iPad, iPhone, and iPod touch
Core Data for iOS: Developing Data-Driven Applications for the iPad, iPhone, and iPod touch

Core Data for iOS: Developing Data-Driven Applications for the iPad, iPhone, and iPod touch

|
     0     
5
4
3
2
1




Out of Stock


Notify me when this book is in stock
About the Book

Today, virtually every non-trivial iPhone and iPad app must manage data—quickly, smoothly, reliably, and with minimal impact on the CPU to conserve battery life. Core Data, Apple’s ready-made data persistence layer, can help you achieve all these goals. In Core Data for iOS, two leading iOS developers teach you the entire Core Data framework from the ground up. Writing for intermediate-to-advanced iOS developers, Tim Isted and Tom Harrington thoroughly explain how Core Data is used on iOS devices, introduce each of its primary classes, and show how they interact to provide amazing functionality with minimal configuration. You’ll learn how to store, fetch, and validate data; provide it efficiently to views; and much more. Isted and Harrington first give you a firm grounding in the technology, and then present real-world examples. They present multiple sample projects, as well as a start-to-finish, chapter-length case study. Coverage includes   • Understanding Core Data’s features, classes, and interactions • Using Core Data in MVC-based iOS app development • Mapping relational data to object models, and building them with Xcode 4’s Data Modeler • Working with managed objects and using UITableView to display them • Creating predicates to match numbers, data, and objects • Maintaining compatibility across versions of an app’s data model • Tracking managed object contexts across view controllers • Using Core Data’s automatic Undo functionality • Integrating abstract entities, entity inheritance, and multiple view controllers into a complete app • Optimizing for iOS devices’ tight memory limits • Diagnosing and fixing common Core Data problems   Introducing Addison-Wesley’s new Core Frameworks Series, written for experienced iOS developers by world-class Mac and iOS developers, these are the first comprehensive, code-rich reference guides to Apple’s Core Frameworks.  

Table of Contents:
Preface   ix Part I  Introduction 1  An Overview of Core Data on iOS Devices    3 A Little History    3 The Birth of Core Data     4 Why Use Core Data on iOS?     4 Relationship Management     4 Managed Objects and Data Validation     5 Undo and State Management    5 Core Data iOS and Desktop Differences    5 The Fetched Results Controller     6 Core Data Case Studies     6 MoneyWell for iPhone     6 Calcuccino     7 Associated Press     8 2  A Core Data Primer    9 Persisting Objects to Disk     9 The Core Data Approach     10 Entities and Managed Objects    10 Relationships    11 Managed Object Contexts    12 Fetching Objects     14 Faulting and Uniquing     14 Persistent Stores and Persistent Store Coordinators     15 Examining the Xcode Core Data Templates     15 The Navigation-Based Project Template    16 The Data Modeler     16 Setting up the Core Data Stack     17 Running the Application    20 A Quick Look at the RootViewController Code     20 Summary     21 3  Modeling Your Data    23 Managed Objects and Entities     23 Dividing Your Data into Entities     24 Core Data in Model-Object Terms     24 Data Normalization     25 Storing Binary Data     27 Working with Xcode’s Data Modeler     28 Creating Entities     29 Creating Properties     31 Creating Relationships     35 Summary     37 Part II  Working with Core Data 4  Basic Storing and Fetching    41 Creating New Managed Objects     41 Saving the Context    42 Fetching Saved Managed Objects     44 Deleting Managed Objects    45 Working with Table Views     46 The Random Dates Application Project     47 The Random Dates Data Model     48 Basic RootViewController Behavior     49 Fetching the Random Date Objects     51 Displaying the RandomDate Objects     52 Deleting the RandomDate Objects    54 Custom Managed Object Sub-Classes    54 Creating and Setting a Custom Class for a Managed Object     56 Summary     60 5  Using NSFetchedResultsController    61 Introducing NSFetchedResultsController    62 Creating an NSFetchedResultsController     62 Supplying Information to Table Views    64 The Number of Sections and Rows     65 Returning the Cell for an Index Path     67 Returning Information about Sections     68 Handling Underlying Data Changes    69 Caching Information    72 Using an NSFetchedResultsController in the Random Dates Application    73 Subclassing NSFetchedResultsController     80 Summary     85 6  Working with Managed Objects    87 Basic Managed Object Subclass Files     87 Creating the Random People Project     88 Managed Object Class Interfaces    89 Managed Object Class Implementations     90 Configuring the Random People Application    93 Displaying the Information    95 Data Validation     99 Validating Individual Properties    99 Validation Based on Other Properties     101 Validation Prior to Deletion     104 Fixing the Random People Application     105 Working with Transient Attributes    105 Modifying the Data Model    106 Adding to the AWPerson Interface and Implementation    106 Adding a Getter Method for the Transient Property     108 Adding a Setter Method for the Transient Property     110 Using the UIColor Property    111 Working with Transformable Attributes    113 The Managed Object Lifecycle     114 Initializing Non-persistent Properties     114 Summary     116 7  Working with Predicates    117 Predicate Basics     117 Creating Predicates Using Format Strings    118 Predicate Variables     120 Predicate Comparison Operators    122 Key Paths    123 Comparing Strings     124 Compound Predicates    126 NSCompoundPredicate     128 Sets and Relationships     129 Examining SQL Queries    130 Adding a Search Display Controller     130 Setting a Fetch Predicate     132 Modifying the Search Predicate    136 Adding a Search Scope Bar Filter    139 Summary     141 8  Migration and Versioning    143 The Migration Problem    143 Changing the Data Model    144 Multiple Data Model Versions and Lightweight Migration    145 Creating Data Model Versions    145 Enabling Lightweight Migration     146 Renaming Entities and Attributes     148 Supplying Renaming Identifiers    150 Keeping Track of Multiple Versions     151 Mapping Models     152 Custom Entity Migration Policies     156 Summary     160 9 Working with Multiple View Controllers and Undo    163 Editing Managed Objects    163 Keeping Track of the Managed Object to Edit    164 Updating a Managed Object’s Properties     168 Validating Managed Objects     171 Working with Undo    174 Multiple Managed Object Contexts     175 Merging Changes from Other Managed Object Contexts    178 Changing Managed Object Values Whenever the Control Values Change    179 Resetting a Managed Object Context     181 Using the Editor Controller to Add New Objects    182 Summary     183 Part III  Building a Simple Core Data Application 10  Sample Application: Note Collector    187 The Note Collector Application     187 Creating the Note Collector Project    188 The Application Data Model     188 Modeling an Abstract Entity     189 Modeling Sub-entities    189 Creating Managed Object Class Files     190 Configuring the RootViewController    192 Displaying the Contents of a Collection    195 Keeping Track of the Collection to be Displayed     196 Examining the Contents of a Raw Data File    200 Setting and Editing an Item Name    202 Creating the New View Controller    203 Displaying and Editing Notes    210 Supplying a Pre-Populated Data Store    217 Working with a Data Store in the Application Bundle    217 Summary     219 Part IV  Optimizing and Troubleshooting 11  Optimizing for iOS Performance and Memory Requirements    223 Performance, Optimization, and Speed     224 Data Store Types    224 Binary and Memory Data Stores     225 SQLite Data Store    225 Monitoring SQLite Stores     225 Optimizing Fetching    230 Setting Fetch Limits    230 Optimizing Predicates    231 Pre-Fetching Relationships     233 Pre-Fetching Any Object    234 Pre-Loading Property Values     235 NSFetchedResultsController and Sections     235 Managing Faulting    235 “Safe” Fault-Free Methods     236 Preventing Property Loading    237 Batch Faulting    237 Re-faulting Objects     237 Managing BLOBs    238 Putting BLOBs in the Entity That Uses Them     239 Putting BLOBs in a Separate Entity    240 Putting BLOBs in External Files     242 Monitoring Core Data with Instruments     245 When Not to Use Core Data    248 Other Memory Management Tips     248 Don’t Use an Undo Manager If You Don’t Need It     249 Resetting the Managed Object Context     249 Summary     249 12  Troubleshooting Core Data    251 Your First Core Data Error     251 The Missing Model     254 Classes Not Found?    255 Core Data Threading Issues     257 Basics of Core Data Multithreading     257 Coordinating Data Between Threads     258 When Threads Collide, or Handling Data Conflicts     260 Danger! Temporary ID!    264 Problems Using Managed Objects     265 Crashing When Setting Property Values    265 If Custom Accessor Methods Aren’t Called     266 Managed Object Invalidated     267 Faults That Can’t Be Fulfilled     268 Problems Fetching Objects     269 Trouble Sorting Data During Fetches     269 Fetch Results Not Showing Recent Changes    270 Summary     270 Index    271    


Best Sellers


Product Details
  • ISBN-13: 9780321670588
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Addison-Wesley Educational Publishers Inc
  • Language: English
  • Sub Title: Developing Data-Driven Applications for the iPad, iPhone, and iPod touch
  • ISBN-10: 0321670582
  • Publisher Date: 17 May 2011
  • Binding: Digital download
  • No of Pages: 305
  • Weight: 1 gr


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Core Data for iOS: Developing Data-Driven Applications for the iPad, iPhone, and iPod touch
Pearson Education (US) -
Core Data for iOS: Developing Data-Driven Applications for the iPad, iPhone, and iPod touch
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Core Data for iOS: Developing Data-Driven Applications for the iPad, iPhone, and iPod touch

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals

    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!