3 ms·
The original MVC architecture was for GUI interfaces in Smalltalk. It was so helpful a design pattern it was borrowed for use in request/response web applicatio
by asolove 14y ago
The original MVC architecture was for GUI interfaces in Smalltalk. It was so helpful a design pattern it was borrowed for use in request/response web application, where naturally the use of each part was very different.
If you really want to "get" the original MVC, see the classic book "Smalltalk, Objects, and Design" [1] which explains MVC and other OO architectures as well as the principles behind them, which might guide you to picking an appropriate structure for applications that don't fit the GUI/MVC paradigm.
[1] http://www.amazon.com/Smalltalk-Objects-Design-Chamond-Liu/dp/1583484906 http://www.amazon.com/Smalltalk-Objects-Design-Chamond-Liu/d...
- alttab 14y agoMy 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.