Nov 14, 2019 09:58 PM|bruce (sqlwork.com)|LINK
the diagram in the book matches the true MVC pattern. The pattern was first made popular with smalltalk and smalltalk UI. The UI (view) components send messages to the controller. the controller would read/update the model. The model (which used an observer
pattern) would send change messages to the view. this would cause the view to update itself based on data changes. the controller can also send messages directly to the view (usually for view navigation, say open a modal).
the web version is slightly different:
the browser makes an http request (get or form post) to the controller
the controller builds a model and passes the model to the view
the view uses the model data to render an html page
the html page is returned to the browser.
in the web version instead of simple messages (typically an id and value), between the model, controller and view, the model itself is passed. the message to a web controller all the post data which is bound to controller action properties. and instead
of sending update messages to the model, the controller builds and passes a complete model to the view, rather than the view subscribing to model events.
the import notion is the user interacts with a view component (which includes the browser address bar), and that component sends a message to the controller, rather than acting on it directly. the control updates the model, and the view renders the model.