samedi 23 mars 2019

What is the best/recommended way to gather user input selections in MVC app design?

I'm creating an app that requires users to setup the game with certain preferences/parameters to the game (number of points to play to, number of players, etc.) and am wondering what is a generally recommended way to gather these inputs. The things I'm struggling with is that I'm trying to adhere to MVC design to separate my View (buttons) from my Model (variable values), but that means that whenever the user touches a button to change one preference, I need to update 2 things: both the View and the Model. Seems kind of inefficient. In my case, would it be better to reload the display and re-save the relevant variable for that preference every time the button is clicked, or would it be better to do nothing with my model when each button is clicked until the user finally clicks to "create the game", in which I scan through all the buttons and gather what their current states are?

Aucun commentaire:

Enregistrer un commentaire