NSControllers and App Design
NSControllers and App Design
- Subject: NSControllers and App Design
- From: Edison Thomaz <email@hidden>
- Date: Fri, 28 Nov 2003 09:03:53 -0800
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.
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.
Thanks! I just want to make sure I understand the fundamental design
pattern here and start using these classes the "right" way.
Thomaz
_______________________________________________
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.