4 ms·
"Controller" is one of those terms that has meant a lot of different things at different times and in different systems. I agree that the same code asset (whet
by curveship 13y ago
"Controller" is one of those terms that has meant a lot of different things at different times and in different systems. I agree that the same code asset (whether it's called a controller or whatnot) that handles user input should not be responsible for implementing a rule like "new users get emailed." At the same time, I also don't think such a rule belongs in your model layer. It should go in its own class (sometimes called a service, sometimes also called a controller). So the controller-managing-ui calls the controller-defining-behavior to make changes to the model.
- asdasf 13y ago>"Controller" is one of those terms that has meant a lot of different things at different times and in different systems It has a very specific meaning: http://en.wikipedia.org/wiki/Model–view–controller http://en.wikipedia.org/wiki/Model–view–controller >At the same time, I also don't think such a rule belongs in your model layer. I'm not talking personal preference, I am talking how MVC works. If your application were MVC, then yes it absolutely would be in the model.
- gbog 13y agoThat's what I thought too, thanks for weighting in.