Remix.run Logo
to11mtm 4 days ago

At least in my head, the 'controller' is what can either take 0 or more parameters or input models as 'input' and the controller can either provide direction to the browser as to what to do next.

e.x. in a 'proper' ASP.NET MVC 4 project I 'inherited', the View took input data in and with a tiny bit of JS magic/razor fuckery around the query page etc, but overall the controllers would return the right hints for the Razor/JS 'view' to move the application flow along or otherwise do a proper reload.

grugagag 3 days ago | parent [-]

In ASP.NET MVC is a modified version of classical MVC adapted for the web.

The Controller in ASP.NET MVC takes on the role of both the classic Controller and part of the classic Model's role (orchestrating the retrieval/updating of data). The connection between the View and the Model is completely severed and mediated by the Controller.

to11mtm 2 days ago | parent [-]

Well I put it the way I did because I've also seen it done wrong (i.e. razor views pulling stuff from DB more directly because razor)