Re: Parent-child Design Pattern
Re: Parent-child Design Pattern
- Subject: Re: Parent-child Design Pattern
- From: Greg Guerin <email@hidden>
- Date: Sun, 12 Jun 2011 13:12:08 -0700
Martin Hewitson wrote:
What I'm unsure about is, how to deal with the children objects. I
will, in principle, have a ChildView. This raises some questions:
1) Should I have a ChildViewController class?
I don't think there's a single answer. Parent/child relationships
can be presented in many ways. For example, see here:
http://designingwebinterfaces.com/designing-web-interfaces-12-screen-
patterns
Many of those designs have some form of hierarchical data models, yet
the views and view controllers may not have the same structure.
You should figure out what the view relationships are, then design
view controllers accordingly. The role of the class is a VIEW
controller, not a MODEL controller; it doesn't have to mirror the
MODEL's structure.
-- GG
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden