Re: Some MVC questions
Re: Some MVC questions
- Subject: Re: Some MVC questions
- From: Koen van der Drift <email@hidden>
- Date: Thu, 18 Jul 2002 20:56:54 -0400
Hi,
Thanks everyone for your answers. It really helped my understand the matter
better now. However, answers generate more questions.
>
I, uh, agree with Andrew that NSMutableArray is not the best choice for a
>
superclass for a graph node class. Since you're making a DAG, I also agree
>
that each node should have an NSMutableArray instance object to hold the
>
other nodes it points at.
Yes, I agree too :)
>
It cannot and should not be a subclass of NSMutableArray. Read
>
about class clusters.
Are you referring to the composite object in the class clusters docs?
>
The controller class(es) ask the model to do things, like add, remove,
>
change and reorganize the structure of the data it contains. The
>
controller is the thing that is most related to the application itself.
>
Can the 'AppController' be used for this? This class is used in various
sample code I have seen (Apple, Hillegass, Beam).
>
Another example of the MVC paradigm in action is the re-organization of
>
the node's on the drawn representation of the graph. The model doesn't
>
need to know how the drawing looks, nor what the co-ordinates of the drawn
>
nodes are -- leave that to the view objects.
So if I understand this correctly, one view iterates the array of nodes and
tells each node "hey you, draw yourself". And another window might lists
the nodes in a table, and only tells the nodes "hey you, write your name".
- Koen.
_______________________________________________
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.