The first edition of Core Data by Marcus Zarra was the book I turned to when I wanted to learn Core Data. Whilst it is still a great book it was. Threading in today’s Core Data is radically different from its original In this talk from #Pragma Conference , Marcus Zarra presents the. Core Data in Swift. by Marcus S. Zarra. Publisher: Pragmatic Bookshelf. Release Date: June ISBN: View table of contents. Start reading.

Author: Arashim Aralrajas
Country: Indonesia
Language: English (Spanish)
Genre: Science
Published (Last): 23 December 2013
Pages: 30
PDF File Size: 8.82 Mb
ePub File Size: 6.60 Mb
ISBN: 672-1-84059-187-2
Downloads: 60845
Price: Free* [*Free Regsitration Required]
Uploader: Magal

You will wait and I will tell you if that tweet posted or not. You would, by the end of your application, have Core Data littered everywhere inside of your app. Geared toward intermediate to advanced developers, this book gets you comfortable with the basics of Core Data. This is an error that can only happen during testing and therefore is safe with just a ZAssert. Maybe someone was listening to a notification on another thread, and they were trying to consume it on the wrong thread, or their UI was doing something bizarre and causing the entire app to halt.

We have to do a bit more dancing to get that right. Not a lot of noise in the interface. I am available to travel and can work on site for short periods of time.

Core Data by Marcus S. They are cheap and meant to be thrown away after a single use.

Core Data by Marcus Zarra

Skip to main content. Core Data is your object model, not a thin wrapper around a database. As of August 1, I am no longer part of MartianCraft. Are you having performance issues that you are unable to isolate? This call returns an array of optionals that has this output in our playground:.


When you access the application delegate in this way you are effectively promoting its properties to the status of global azrra and singletons. Once the main context has saved then we move on to the private queue.

Core Data Intermediate Swift. With new information for beginners and experts alike, they are a great insight into how you should be marxus Core Data and the features that it offers.

While at Empirical Development and then MartianCraft I had been distanced from all of the inventive solutions that other development teams have been coming up with for the past few years. Then, more and more defined rules developed over the years, but they were still confusing.

The good news is that this has gotten better in iOS 9. This has changed a bit in iOS 9, where they added a new feature to allow mardus to consume remote notifications. Zxrra a rule, any time we are leaving the application we want to call save on the persistence controller. The User Interface is zarrw to run on a single thread and therefore using additional NSManagedObjectContext instances is unnecessary and creates problems.

Core Data by Marcus S. Zarra

I have a preference for technical books that are written by experienced practitioners with a strong point of view. We built a whole new development team and rewrote the app. The interface always starts out this simple. So, on this line:.

We have an initialization, access to marvus main queue managedObjectContext and a -save method. Your user interface does not need to know any more about Core Data than it does for any other model structure.


It is a scratchpad. We should be making sure that the performance problems are actually where we think they are, not guessing at them by just doing log statements or other clever stuff. Aug 23, Dmitry rated it liked it. Paperbackpages. Detect that, and save during that time.

Where does it not work? The context could at least query it or get some information from them. We call super init and when that is successful we make a copy of the block that is passed in and then start the initialization of the Core Data stack. Threading is even trickier than the first version.

It could be a zarrq herring. If it is going to take time, we do not want to block the main thread and therefore the User Interface. The parent context should be on the user interface thread the main thread and when you need to do asynchronous work with your data objects importing or exporting then you want to do that on another thread and that work should be done in a child context.

The next three chapters on Core Data versioning and migration, performance tuning and threading are all essential reading. It also adds a property for the privateContext and we make a copy of the callback block that gets passed in. The private queue context has one job in life.