Welcome Guest, Not a member yet? Register   Sign In
1 controller = 1 model VS. 1 controller = multiple model
#12

Yes keeping 1controller - 1 model will be ideally helpful.
Though there are few exceptions sometimes that is why we create models against specific set of feature.
For e.g Login_model will have everything related to:
  • Check user
  • Forgot password
  • Session creation
  • Logout
So basically we include login_model to check user session in almost all the controllers not only Login controller.

Also thinking from controller perspective for e.g. Checkout controller on any ecommerce site can deal with multiple models such as:
  • Customer_model
  • Order_model
  • Invoice_model
Bhaumik Kothari

ADEPTSTATION LLP
https://adeptstation.com
Reply


Messages In This Thread
RE: 1 controller = 1 model VS. 1 controller = multiple model - by bhaumikkothari - 08-27-2018, 11:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB