Answer the question
In order to leave comments, you need to log in
Do I need to allocate a controller for each category on the site?
Good time to all! I'm still new to architectural solutions and to creating projects)
I have a question. I'm building a tutorial site and I have some links (categories) in the header. The main one displays all the articles, and the rest in the link pass the argument with the site category I need to the action in the controller. And in this way, from the model, I cling the articles I need from the category I need and display them on the view.
And the question is, I think it's better to immediately highlight the controller under the category and just make a conclusion of all the articles for this category there?
Thanks in advance and can you advise in terms of architecture advice or maybe some books)
Answer the question
In order to leave comments, you need to log in
Become a Full-stack .NET Developer . (excellent video course, 3 series of lessons)
If the categories are independent, and most likely will develop / change independently, then they should be placed separately.
But right off the bat, you can't do it right. The architecture (how the system is divided into parts, and how they interact with each other) changes over time, some constituent components are broken into several smaller ones, others, on the contrary, are combined (which happens much less frequently).
Nothing terrible will happen if at first everything is in one place, because. it is not clear what will happen next, and everything is similar, but over time, the requirements will change, and it will be more clear what to do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question