Call Down, Notify Up
In response to a post by Brent Simmons on large Cocoa projects (with follow-ups by Blake Seely, Daniel Jalkut, and Michael Tsai), Rentzsch lays out a theory of application design that I wholeheartedly endorse:
"Think of your Cocoa application as a layer cake: Foundation at the bottom, AppKit in the middle, your code on top. It’s OK for higher levels to know about and use lower levels, but not going the other way. By keeping the lower levels ignorant of its clients (the higher levels), you keep them reusable."
Which brings me to my one and only coding mantra:
Call Down, Notify Up.
In Cocoa this means that while you can directly call methods on objects defined in layers below you, those objects should never call methods specific to you — if they need to communicate with the upper layer, they should do so via return argument, explicitly defined delegate method, or NSNotification. I used to keep this written on a post-it note stuck to my monitor. That damn stickie is the closest I've ever gotten to a universal design oracle.
Call Down, Notify Up is easier in Objective-C than in any other language I've ever used, which is one of the reasons why I'm willing to put up with its crap.
(Aside 1: Call Up, Notify Down is the mirror technique to avoid excessive coupling. You don't see this pattern used explicitly very often in object-oriented desktop apps, but manual event dispatching made this more common in the Mac Toolbox days. You also sometimes saw it in embedded OS kernels that were all bottom half and no top.)
It's also nice to see that other people keep all their source files in a single huge directory and only organize them within Xcode. This seems to be a fairly good indicator of Mac vs. Unix heritage. The Mac folks have relied on GUI IDE's since time immemorial, while on the Unix side everything had to work from the command-line.
(Aside 2: Thinking about this made me fire up THINK Pascal [it still runs, thank you Classic!] and I remembered why, much to the chagrin of those collaborated with, Geneva 9 was for many years my programming font of choice. Pascal in Geneva 9 is stunningly beautiful, a true joy to look at. Nothing in the monospaced world even comes close.)