A better and (maybe) detailed explanation of MVC | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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 Resposta
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