Revision #3 was created by zaccaria on Nov 9, 2010, 11:43:49 AM.
ul
Content
[...]
### Controller
In the controller there should be the code for collect user input, retrive models from database, rendering views.
In a controller there should never be:
- html code (it should be in the view)
- sql code (there should never be, if is needed it should stay in a model)
- field name they should be in the view.
[...]
In the view there should not be:
- user input ($_GET, $_POST) input should be collected in models in the controllers, never in views.
- sql code: if is neede, better to crete functions in the models
[...]
In the models there should not be:
- user input ($_GET, $_POST)you should write a function that will be called in the controller.
- html code (it should be in the view)