2 ms·
> You take a table from the database and put it into an html tag table. Wait, who is “you”? The model? The model tells the view about itself. This is early O O
by LeonB 3y ago
> You take a table from the database and put it into an html tag table. Wait, who is “you”? The model?
The model tells the view about itself. This is early O O. Everything is an object. And objects have power and self awareness. When the view receives the message telling it about the model, it does what it has to do to make the model viewable.
So the model and the controller don’t know about html. The view received a message (the current state of the model, or a delta thereof) and responds accordingly.