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

You should make your models follow a domain or topic, like user model, product model, basket model, invoice model, etc.

Controllers are site functions that take input (current user session, product they wanted to add to basket, current open basket for current user) and interact with them (add selected product to open basket).

Different site functions might re-use some models (user session is used on every page, basket is used for adding products, viewing basket contents, completing an order, etc).
Reply


Messages In This Thread
RE: 1 controller = 1 model VS. 1 controller = multiple model - by Pertti - 08-21-2018, 01:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB