Often when I design a program with MVC, the controller is useless half of the time.
What I mean is this: something happens on the view (e.g. a button click). The view then notifies the controller. The controller then directly delegates to the model and does nothing else because it has nothing to do.
For example:
User presses button 'Color Blue' > view tells controller controller.colorBlue()
> controller tells model model.colorBlue()
> model colors something blue.
In this example, the controller seems useless. It adds nothing. The view might as well have talked straight to the model.
The other half of the time, however, the controller does do some kind of mediation between the view and model.
My question is this: how common is this in MVC structures? Is it reasonable that half the time my controller seems unnecessary? Or is this a problem? Is this common? How should I approach this?
If my question isn't clear enough, please say so.
controller.colorBlue()
actually then callsmodel.setColor(0, 0, 255);
. One reason for separation between Model and View is that it is often the case that you have multiple UI elements to represent a single state in the model (e.g. an item is checked in the menu, the toolbar is depressed, and pointer changes to a fill icon all corresponds to the currently selected tool field in the model), with MVC separation the model would not have to worry about synchronizing the different UI elements.