I am developing an application and I am pondering something. So I thought I would ask people with experience to tell me what they think about it.
So, I have this controller (storage controller), which is huge and has many methods, Get and Post actions, etc. It works very well, but I'm still under development.
I am wondering what would be the best practice: to have this controller that contains so many methods and actions, or share methods into many controllers? Is it ideal to have one controller with almost all methods or many controllers?
And before you ask, yes, everything in my store controller is "connected to the store." But in my store I have items, packages, etc.
Edit
Thanks everyone! Following your advice, I split my huge controller Store
into smaller controllers: one for items, one for packages, etc. It really makes the code more readable. In addition, a lot of comments will provide me on my way to the update, so thank you very much!
source
share