I'm having a difficult time in implementing MVC's View and View's responsibilities. By the way I'm implementing the MVC in new way, not smalltalk's traditional way (controller between model and view. View does not have a relation with model vice versa)
My problem is sth like following. My View have a test list shown as a table, each table row corrensponds to a single test and user can select more than one test. And each test (row) may have 0 or more options for the selected test. After clicking 'start test' button, my application is supposed to execute selected tests with their selected options.
How should I implement this part of my application so that controller is informed about the selected tests and parameters? Should the view provide the information about selected tests and parameters?(makes View a little intelligent, not dumb as desirerd ?)
Should the view provide information by going through all rows of table and checking the parameters(hence no dedicated 'selected tests and params structure' or should it store selected tests and test parameters in a dedicated structure and post it when controller requires?
Or controller knows the view and it can grab all the data it needs from View?
Aucun commentaire:
Enregistrer un commentaire