Re: ArrayController, CoreData & Bindings
Re: ArrayController, CoreData & Bindings
- Subject: Re: ArrayController, CoreData & Bindings
- From: mmalcolm crawford <email@hidden>
- Date: Wed, 10 May 2006 20:15:45 -0700
On May 9, 2006, at 8:25 AM, Bobby B wrote:
Just out of curiosity, why is it "wrong" to do it that way?
It's just poor design.
Controllers are for managing the interaction between your model
objects and your human interface.
If you use a controller to set up default data, you're making your
application architecture fragile. What happens when you change your
user interface? What happens when you subclass the controller to do
custom initialisation of its new objects? Why add the overhead of
manipulating the user interface to get a reference to an object you
should be in charge of anyway...? Why (assuming you're using the
document architecture) use the contents of the array controller to
determine whether or not data has been initialised when there is API
available precisely for set-up? Why (assuming you're not using the
document architecture) not use a more reliable means of determining
whether or not this is the first run of the application than just the
count of object in the UI element?
There are probably many other considerations, but these should be
enough for now...
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden