I am just starting to work with MVC, and it seems that this will be a great way, as soon as I manage to switch my thinking.
Most of the material I came across seems to have a 1-1 relationship between models, views and tables - i.e. each model is a table and allows CRUD, as well as more complex functions.
What if I have an account model that will allow you to create and update accounts.
I would like to use the view / controller to register and the controller to create () an account, but I would like to use the view / members / account and controller to update, change pw, etc.
Would it be better to have a registration model, or am I fine using only the model that I need from several places?
In addition, let's say an account can have many users, but I want to create the first user during registration. I would like to start setting up an account and creating a user as a transaction. Should I have an account model and a user model and work with both, or just have the signup create () function for the account to create the default user?
I am using PHP with CodeIgniter
architecture model-view-controller model
Eli
source share