views:

5

answers:

1

Good people of StackOverflow,

I am in the early stages of building a non-document-based Cocoa application. What I'm aiming for is a window layout similar to iTunes, with a left, middle, and right pane. The Xcode template for such an application includes a file called MainMenu.xib containing both the main menu, and the main application window, with supporting logic contained in the MyApp_AppDelegate class.

I can already foresee that continuing down this route will eventually lead to a very large and disorganized app delegate class. Therefore, my spidey sense tells me to break out the logic for the main window into its own NSWindowController subclass (and accompanying XIB file). Furthermore, would I be correct to split out each pane into its own NSViewController subclass? This would seem to better separate my concerns, at the expense of more files and some extra code to wire everything together.

The closest advice I've been able to find is in Apple's Interface Builder User Guide but it does not answer the question directly. However, I guess my question is not about nib files in particular, but about high-level application organization.

A: 

For anyone wondering the same thing, this and this and this pretty much cleared it up for me.

Apparently the NSViewController stuff is relatively new and not well documented yet.

alexantd