Answer the question
In order to leave comments, you need to log in
What is the responsibility of the "thin controller" and how does it connect the view to the model?
Starting to study the web, I came across an inverted mvc world. I will not write my vision of mvc (yet), but I will immediately ask you to tell me what is the responsibility of the "thin controller" and how does the view connect with the model?
Answer the question
In order to leave comments, you need to log in
you file all the logic into services, and in the controller you call only the necessary methods from these services.
But in object-oriented programming, an active MVC model is used, where the model is not only a collection of data access code and a DBMS, but also the entire business logic. It should be noted that a model can encapsulate other models within itself. In turn, the controllers are only elements of the system, whose immediate responsibility is to receive data from the request and transfer them to other elements of the system. Only in this case the controller becomes "thin" and performs exclusively the function of a link (glue layer) between the individual components of the system.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question