inessential by Brent Simmons

Core Data revisited

I wrote about Core Data last year, about how I was switching away from it for one of my apps. The post achieved some notoriety, and to this day people reference it as if I wrote a scathing takedown of Core Data.

Which is not true at all. Here’s what I wrote:

I bet Core Data is the right way to go 95% of the time. Or more. It’s easy to work with. It’s fast (in most cases). It has schema upgrade tools.

Since that post I’ve used Core Data in other projects. NetNewsWire Lite 4.0 for Macintosh is a pretty big example of a Core Data app.

At the moment I’m finishing switching my current app over to Core Data. (It will still use FMDB + SQLite for a few things, but the main storage will be Core Data.)

This may come as a surprise to people who have it in their head that I’m the guy who doesn’t like Core Data. So I’ll say this — on top of all the other good reasons to use Core Data, here’s another: Core Data is the standard Cocoa object persistence system.

When it gets better, our apps get better. (And it does keep getting better.)

And, more importantly, as the standard it means that any Cocoa developer — a teammate or someone who acquires the app — can jump in and quickly understand how it works.

Yes, your custom thing may be better for your app. But will it stay better? And if you bring someone on to help you, how quickly will they learn your custom thing?

Use Core Data.