MVC - thin controller idea - Codeigniter/Zend
- by user505988
Hi,
Could some one possibly clarify this for me. In the MVC paradigm, the idea is to keep the controller as thin as possible, it is also true that the model is the bit that communicates with data sources such as the database, XML-RPC etc and this is where the business logic should go.
Is the POST and GET data a 'data source' and should that kind of data be handled by the model or should it be by the controller.
I would normally call a method in the model and pass it the post data, the data would be quality checked by the controller and the model method would simply do the insertion or whatever. Should it be though that controller just calls the model method if a post has occured and it is responsible for sanity check, data checks etc.