← Graph

Fat Model Skinny Controller Is A Design Mistake

takeaway 2 connections

Bellware's claim, provable via static-analysis of distance-from-the-main-sequence: 'fat model, skinny controller' is one of the most fundamental mistakes in Rails design. Model objects are highly afferent (everything calls into them), so piling controller-specific business code onto them lands in one of the absurd quadrants — highly afferent + highly special — and maximises the blast radius of changes. The historical root cause: Rails controllers couldn't be tested, so code that belonged on controllers drifted onto models. If TDD had actually been applied, controllers would have been designed to be trivially instantiable and testable.

type
warning
takeaway Fat Model Skinny Controller Is A Design Mistake
about
The takeaway critiques the fat-model-skinny-controller convention.
takeaway Fat Model Skinny Controller Is A Design Mistake
from_talk
Extracted from Bellware's analysis of the design quadrants in the talk.

Provenance

Read by
1 extraction