Obligatory, “I am a noob with MVC/PHP/Yii don’t be mad that I am asking a obvious question” comment.
How would you architect a view/controller to support a page that would allow updates to multiple models? For example: If I had a magazine model and wanted to display a page that allowed users to view/edit,
[list=1]
[*]properties of that model, such as the magazine name or publication date
[*] many-to-many relationships, such as the categories that the magazine belong to and
[*] properties of related models, such as the author of a article in that magazine
[/list]
Some specific questions I have:
[list=1]
[*]Should the MagazineControler handle this view or some custom controller?
[*] Should the view contain a single form, or multiple?
[*] If I were to use widgets to render repeating content or inputs, should that widget also handle the related POST?
[*] Should I avoid lazy loading the model data as it will make multiple DB calls?
[/list]