Welcome Guest, Not a member yet? Register   Sign In
Codeigniter MVC!?
#2

[eluser]boltsabre[/eluser]
Option 2 it the better way to do it. Basically your model should handle all your "data" related functionality, your controller acts as the "between man" interacting between view and model.

There are several approaches towards this:
- Fat Controller, Skinny Model (where you do all your form validation in the controller for example, and your model simply runs db queries)
- Skinny Controller, Fat Model (where the controller basically just loads the model and view, and sends the data to the model which does the form validation, db queries, etc).

I suggest you run through some of the online video tutorials if you're still a bit confused about it. While most wont go into the fat vs skinny debate, they give you a basic, yet solid, understanding of what / how MVC operates and what tasks should be delegated to your controller, model, etc.


Messages In This Thread
Codeigniter MVC!? - by El Forum - 02-26-2013, 09:16 AM
Codeigniter MVC!? - by El Forum - 02-27-2013, 01:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB