Shears wrote:Below is a section of one of my bad controllers.
ive written worse
Shears wrote: What can I use so I don't have to keep writing something similar to the below every time I wish to call a model which uses user inputted
If controller behavior is being duplicated it should be refactored into a controller layer super class. If it is verbose it should be "pushed down" into the model layer
Shears wrote: inputted (is that a word?) data...
"user input data", 'input' in this context can be used past tense I think
Shears wrote:How should I ensure all the necessary POST/GET etc variables are set?
These are request environment specific concepts, the controller should set up the path of communication for all request data to be seeded into your models, then the model should be asked if the data supplied was sufficient or not.