[eluser]snoo[/eluser]
Hi Guys,
I'm new to the whole MVC structure and to coding in general. I'm a little confused and would like to know the best practice on where to keep my code so that it is clean and easy to maintain.
So far with CI, this is what I've been doing.
View: html and printing variables passed from controller.
Controller: controls what data to show / action to take base on user action
Model: retrieve data from database and send it to controller.
Because of my current practice, my model is usually pretty slim, consist of standard CRUD functions and variations of it. On the other hand, my controller is usually fat and bulky due to having to parse inputs and segments and assemble arrays and variables so view can easily print out without having to do much php init.
Is this normal, or should I use model to do some of the logic work I'm currently doing on controller?
Thanks for any input.
William