designquestions for my app
-
My app have a main form (mdi contaier) with a treeview menu. Interacting with the treeview, for example clicking the project node, opens up a new project form (mdi child), clicking the status node opens up a new status form (mdi child), etc. I want to use a MVC pattern for the gui part and have some questions regarding this (first time using MVC). * Is it sound to have one controller for each form, ie maincontroller, projectcontroller, etc? * As it is now the maincontroller instantiates (opens) the other forms and their controllers and passes along a reference to the mainform (some of the childforms need to update the treeview menu). Is there a better way to do this? /thanks
-
My app have a main form (mdi contaier) with a treeview menu. Interacting with the treeview, for example clicking the project node, opens up a new project form (mdi child), clicking the status node opens up a new status form (mdi child), etc. I want to use a MVC pattern for the gui part and have some questions regarding this (first time using MVC). * Is it sound to have one controller for each form, ie maincontroller, projectcontroller, etc? * As it is now the maincontroller instantiates (opens) the other forms and their controllers and passes along a reference to the mainform (some of the childforms need to update the treeview menu). Is there a better way to do this? /thanks
I would be very surprised if you could break a project down to a 1-1 mapping between controller and view. This was the type of model that was exposed as Document-View and was widely seen as having problems. It is more likely that your controller will have several views.
Deja View - the feeling that you've seen this post before.
-
I would be very surprised if you could break a project down to a 1-1 mapping between controller and view. This was the type of model that was exposed as Document-View and was widely seen as having problems. It is more likely that your controller will have several views.
Deja View - the feeling that you've seen this post before.
-
So your saying that I should try keep it down to only one controller? or is there another approach? /thx
No - I'm saying keep it down to 1 controller per model. You can have multiple views per controller/model.
Deja View - the feeling that you've seen this post before.
-
No - I'm saying keep it down to 1 controller per model. You can have multiple views per controller/model.
Deja View - the feeling that you've seen this post before.