Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do MVC controllers save state?

Tags:

asp.net-mvc

Is it appropriate in the MVC pattern for a controller to save state in any way.

Note, I realize that controllers do not save state on ASP.Net. I'm not using ASP.Net. I'm wanting to know if that pattern restricts this or not.

like image 949
Jordan Avatar asked May 23 '26 20:05

Jordan


1 Answers

The pattern would have you save the state to the Model/models, not the Controller. The controller could modify the state, or the model could contain internals to modify it's own state.

like image 83
bighead.dev Avatar answered May 25 '26 12:05

bighead.dev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!