Archive for April 18, 2013

Thursday, April 18, 2013

The Concurrent Core Data Stack

Florian Kugler:

There is also a very clean flow of data from the worker contexts through the main context to the master context, which finally persists all changes. Since in this setup you never touch the master context, i.e. you never directly make changes to it, all changes flow through the main context. Therefore you will always have the latest data available on the main thread. No need for listening to change notifications and merging changes manually.

The key insight here is that managed object contexts in the same hierarchy can have different concurrency types. However it seems to me that this could potentially push a lot of work onto the main thread as fetches from that context would have to reconcile the differences between the disk and memory.

Update (2013-04-29): Florian Kugler:

Core Data stack #3 with its independent managed object contexts blew the other two options out of the water. It literally crushed them. I didn’t expect the nested setup #2 to be so much inferior.

Update (2013-05-13): Florian Kugler:

In this article I will take a look behind the scenes of how nested managed object contexts operate and explain why the performance of saving a child context often is much worse than manually merging changes into a context. Understanding how each approach works will make clear, that nested contexts are certainly not a replacement for “manual” merging.

The Default Narrative

Watts Martin (via John Gruber):

If there’s something I could do with OS X 10.6 that I can’t do with OS X 10.8, I haven’t found it yet. My software all still works.

I wish someone would make a list, because it surely wouldn’t be empty. Spaces has been reduced from two dimensions to one. Xcode and other apps have become less AppleScriptable. Safari has become buggy. Changes to Sync Services, without adequate replacements, broke Outlook and Yojimbo. Some things have improved, for sure, but there is also a lot that has become more limited, closed, or broken.

Again, no real evidence supports this—the iOS elements that have been migrated to OS X have not resulted in OS X becoming more locked down. And there’s no reason to think that more OS X technologies won’t move to iOS, making it less locked down.

He’s apparently never heard of sandboxing. Some apps bought from the Mac App Store on 10.6 have either had features removed or can no longer be updated. It also affects apps outside the Mac App Store. For example, Mail on 10.8 is sandboxed, which affects what plug-ins can do. Locking down Safari also affected plug-ins such as 1Password. Will Aperture plug-ins be next? Spotlight is also more locked down, which broke a feature of one of my apps. Restrictions on NSDistributedNotificationCenter affect the kinds of services that apps can provide.

While iOS is locked down by comparison—and there are some things that definitely do need to be opened up with respect to inter-application communication—an iOS device is an application console. We don’t complain (much) about a PlayStation 3 being “locked down” because it’s a game console. That’s what they do.

This is circular reasoning, with an appeal to a nebulous term that Apple has never used. The bottom line is that some people have needs that the product isn’t meeting. They can either go without (and try to influence future versions of the product) or switch to a different product (which has other drawbacks). Appeals to terminology attempt to shut down discussion without addressing the underlying issues in a constructive way.

It’s like saying in the early 80s: you don’t understand, it’s a Mac. It’s not supposed to have color, internal storage, networking, multiple processes, arrow keys, a compiler, a command line, etc.

Introducing Fargo

Dave Winer’s new product, Fargo, is a Web-based outliner that edits OTML files in Dropbox.

Why LinkedIn Went Native

Kiran Prasad (via Aaron Hillegass):

We have definitely shifted from HTML5 to native. The primary reason for that is, we’re seeing that more and more people are spending more time in the app, and the app is running out of memory. It’s not performance issues, like speed or rendering, but it’s still a big problem.

The second reason we’ve gone native is trying to get some of the animations — the spinners and the way they work — getting that smoothness, we felt like we needed native to really do that well.

WebCode 1.0

WebCode is a “vector drawing app that instantly generates JavaScript+Canvas, CSS+HTML or SVG code” (via Matt Gemmell). The dynamic colors features looks interesting. PaintCode and Opacity are similar apps that generate Objective-C.

Authorization

xkcd considers the usefulness of an admin account.

Interface Builder: Curse or Convenience?

Florian Kugler (via Romain Briche):

After working on a fairly complex iPad app for the last six months together with Chris Eidhof, my personal bottom line for Interface Builder doesn’t look too positive with regard to these tasks. In fact, I’m willing to try out abandoning Interface Builder alltogether for the next project. This may sound pretty radical, but let me walk you through my thought process.