Re: NSControllers and App Design
Re: NSControllers and App Design
- Subject: Re: NSControllers and App Design
- From: Scott Anguish <email@hidden>
- Date: Fri, 28 Nov 2003 14:48:06 -0500
On Nov 28, 2003, at 12:03 PM, Edison Thomaz wrote:
Hi everyone,
Like many of you, I am starting to play with the new NSController
classes and questions are beginning to pop up in my head. Going over
the documentation and the new Currency Converted example, everything
looks good, especially because of the simplicity of the examples.
The key questions that I have when thinking about my own apps are:
1. In terms of design, should these new classes completely replace the
controller class that I had in my pre-Panther projects? The new
controller classes make it easy to bind model objects to the view
layer through the binding mechanism, KVC, KVO, etc, but what about the
other things that one normally needs to do in a pre-Panther controller
class such as manage timer objects, or archive/serialize data when the
app opens up or closes, etc? Do I still need to have an app controller
class that does all that? In other words, should the
NSObjectController and NSArrayController objects be used exclusively
to bridge the model and view layers while another controller manages
the app? I think the answer here is yes.
I think I'd agree. There is no significant reason to lump all of the
controller features in to subclasses of NSObjectController
2. Assuming the Currency Converter NSArrayController example, If I
have in my UI two NSTableViews showing data from two different data
sources, do I need to have two NSArrayControllers? Again, I think it's
a yes.
Yes.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.