R
R
rusglov2018-07-11 20:11:51
JavaScript
rusglov, 2018-07-11 20:11:51

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

1 answer(s)
K
Kirill Nesmeyanov, 2018-07-12
@SerafimArts

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 question

Ask a Question

731 491 924 answers to any question