MVC, but is it MVC?
Hi,
I am not here to bash, rather to discuss. I am wondering how much of your examples really are MVC. The site you link to yourself says the following:
Though MVC comes in different flavors, control flow is generally as follows: The user interacts with the user interface in some way (for example, by pressing a mouse button). The controller handles the input event from the user interface, often via a registered handler or callback, and converts the event into an appropriate user action, understandable for the model. The controller notifies the model of the user action, possibly resulting in a change in the model's state. (For example, the controller updates the user's shopping cart.)[4] A view queries the model in order to generate an appropriate user interface (for example the view lists the shopping cart's contents). The view gets its own data from the model. In some implementations, the controller may issue a general instruction to the view to render itself. In others, the view is automatically notified by the model of changes in state (Observer) that require a screen update. The user interface waits for further user interactions, which restarts the control flow cycle.
as far as I can tell, the controller should handle input rather then the view, resulting that for example your capture examples makes that mistake. If this is correct, the controller should handle all things like eventListening, and the view should simply handle the creation and look of the elements.
Does that sound correct to you?