I am battling to understand when I should create a new controller.
Let’s say I have an application that maintains people records (Name, age etc)
I have a few views.
A view to show a list of people, which I can select to display.
A view to display detailed person information (view only)
A view to edit a person record
A view to add a person record
(Is Add and Edit usually one view, in MVC?)
At the moment, I have one controller. But is that right, or should I have a controller per view?
I’m worried my single controller is getting too big…
It is better to have a controller per resource (person in your case), not controller per view. So you are correct to have a
PersonsControllerhandling the list of persons, a person details and editing a person.