문제

I just wanted some advice regarding the MVC way of doing things. I am using codeigniter and I was wondering if it's better to have one controller per page for a website or to have one controller for all the pages?

Let's say I have a simple website where you can visit the homepage, login, create an account and contact the admin.

  1. Would it be better to have these controllers: frontend(index), login, account, contact OR having one controller called frontend or whatever with the actions such login, createAccount, contact?

  2. When do you know if its better to use one controller in a situation?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 softwareengineering.stackexchange
scroll top