Skip to main content
added 2 characters in body
Source Link
mefisto
  • 669
  • 4
  • 9

Controllers actually have only one responsibility: altering the applications state based on user's input.

A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document). source: wikipedia

source: wikipedia

If instead you are having Rails-style "controllers" (which juggle active record instances and dumb templates), then of course out are breaking SRP.

Then again, Rails-style applications are not really MVC to begin with.

Controllers actually have only one responsibility: altering the applications state based on user's input.

A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document). source: wikipedia

If instead you are having Rails-style "controllers" (which juggle active record instances and dumb templates), then of course out are breaking SRP.

Then again, Rails-style applications are not really MVC to begin with.

Controllers actually have only one responsibility: altering the applications state based on user's input.

A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document).

source: wikipedia

If instead you are having Rails-style "controllers" (which juggle active record instances and dumb templates), then of course out are breaking SRP.

Then again, Rails-style applications are not really MVC to begin with.

Source Link
mefisto
  • 669
  • 4
  • 9

Controllers actually have only one responsibility: altering the applications state based on user's input.

A controller can send commands to the model to update the model's state (e.g., editing a document). It can also send commands to its associated view to change the view's presentation of the model (e.g., by scrolling through a document). source: wikipedia

If instead you are having Rails-style "controllers" (which juggle active record instances and dumb templates), then of course out are breaking SRP.

Then again, Rails-style applications are not really MVC to begin with.