04-20-2015, 07:27 AM
I vote No. But bow to greater experience in the matter.
I use the models to represent areas of concern, not tables. I tried on one site to have one model per table but it just didn't work for me. Where do you put queries that get from more than one table, or queries that update several tables?
Even the way I do it now sometimes leaves me scratching my head about which model to put the function in. I think the role of models is very dependent on the nature of the site.
One of the things I truly love about CI is that I can work in any way that suits me with it. I would not want to lose that even if it means that I can work NOT following best practice if I choose to. (I admit also to sometimes putting queries in controllers for quick solutions and small sites).
Paul.
I use the models to represent areas of concern, not tables. I tried on one site to have one model per table but it just didn't work for me. Where do you put queries that get from more than one table, or queries that update several tables?
Even the way I do it now sometimes leaves me scratching my head about which model to put the function in. I think the role of models is very dependent on the nature of the site.
One of the things I truly love about CI is that I can work in any way that suits me with it. I would not want to lose that even if it means that I can work NOT following best practice if I choose to. (I admit also to sometimes putting queries in controllers for quick solutions and small sites).
Paul.