0

A better and (maybe) detailed explanation of MVC

Up to what extent are the controllers/views in the URL? And what are slugs and how does it works?

28th Feb 2019, 8:01 PM
Josh De Vera
Josh De Vera - avatar
1 Antwort
0
The model represents the data, and does nothing else. The model does NOT depend on the controller or the view. The view displays the model data, and sends user actions (e.g. button clicks) to the controller. The view can: -be independent of both the model and the controller; or -actually be the controller, and therefore depend on the model. The controller provides model data to the view, and interprets user actions such as button clicks. The controller depends on the view and the model. In some cases, the controller and the view are the same object https://medium.freecodecamp.org/model-view-controller-mvc-explained-through-ordering-drinks-at-the-bar-efcba6255053
1st Mar 2019, 11:40 AM
Before
Before - avatar