3 ms·
My original implementation of Mvc was writing a game of connect 4 in java. There was a board model. There were two views. One graphical, and one command line. Y
by alttab 14y ago
My original implementation of Mvc was writing a game of connect 4 in java. There was a board model. There were two views. One graphical, and one command line. You could update both views by clicking your next move on the graphical board, or putting input on the command line. Once the model was updated, the controller would update any view that was listening on it.
- cbsmith 14y agoThe controller shouldn't be updating the views. The views should be observers of the models. The controller updates the model, which triggers messages from the models to their observers, the views. They would then would then reflect the change in the model.