Answer the question
In order to leave comments, you need to log in
Question about events in the MVC design pattern?
Guys, I'm writing a small js application - a library. I want to know where it would be more correct and practical to hang events on all buttons: add a book, delete a book, edit a book. In the controller or in the view itself? Thanks in advance.
Answer the question
In order to leave comments, you need to log in
If you do not go into implementation details, then subscription to events in the view is MVVM (with feedback from the controller), and in the controller - MVC (with feedback from the model).
So it all depends on what you want to implement. Again, this is all a rough approximation.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question