October 30, 2012 | 1min read
Winning the war on CoreData Boilerplate code!
As wonderful as CoreData is, most tasks require a set of repetitive / boilerplate method calls. The result is code duplication, and reduced readability. A different challenge lies in implementing Thread Confinement as described in [Concurrency with Core Data](http://developer.apple.com/library/m ac/#documentation/cocoa/conceptual/coredata/Articles/cdConcurrency.html).
We have just released a set of helper tools, to solve these problems. Check out: PLCodeDataUtils on Github.
Firstly, you will see a category on NSManagedObjectContext implementing common
data access and manipulation methods. “Create or update a entity?” A common
issue that would normally require you to perform a fetch manually. Instead you
can now use our helper method
Secondly, you can use PLContextHolder whenever you need to perform any CoreData task on secondary threads. It handles the creation and merging of the context for you.
Finally, there’s PLEntityObservatory which tracks updates on selected entities. So now there’s no need to use a NSFetchedResultsController.
Principal Software Engineer
You might also like
August 04, 2020
Société Générale and Their Journey to Open Source
Our PM, Karolina, had the chance to talk to two men from Société Générale before the Airflow Summit 2020 about the company's transition to Apache Airflow. Here's what she learned.