I think too often we look at how to best do our job by using a tool to get our database into the form of an html form. If you take the time to learn the tools, then this can work for you. The problem is that often we're so mired in getting this kind of stuff to work automagically that we forget that the end result is to make software for the end user, not for the database.
Stuff like using a datagrid (controlling a 1-M from the one side) or a drop-down / select box (controlling a 1-M from the many side) are just two possible ways that this can be dealt with, and there's no way you can look at a 1-M relationship in the database and figure out what's best. You can guess, but that's all you're doing: guessing. You really find out by talking to the user of your application. Sometimes an entity and it's children can be so large that a data grid would be unwieldy for the children, but it still makes sense to add modify children from the parent's page. Here I would put the children in it's own page/form, which is reachable from a link or button on the parent's admin page. The advantage to this approach is that the individual forms are typically just one entity, and thus simpler. The disadvantage is that the user might take more clicks to get to what you they want to edit. But in the end, you can't have one "pattern" to do it all. Just because you've found/made a great hammer doesn't mean you should be hammering in screws. Now, if you're talking about a specific situation, such as "Creating a form for the parent along with a datagrid for all the children all on one page", then we can talk implementation. But I don't think that this theorizing on one way to implement the interface for a one-to-many relationship has a true answer. -- Mark Hildreth 263 Kibbe Rd. East Longmeadow, MA 01028 (413) 883-9139 [email protected] -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
