Answer the question
In order to leave comments, you need to log in
What is the best way to organize mvc controllers?
I am currently developing a simple music streaming service as a pet project (like spotify or Yandex music), and I have a question: "how is it better to distribute responsibilities between MVC controllers?". For example: Do I need to create a separate controller for user login/registration, downloading/managing music, etc.?
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
It seems to me - yes.
Personally, in my project I divide them by resources -
A separate controller for authentication, a separate one for other entities, one more for others.
It turns out something like
/api/auth
/api/entity1
/api/entity2
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question