Fat Models

на сайте с May 10, 2023 20:35
In 2006 Jamis Buck introduced his philosophy of “Skinny Controller, Fat Model,” which was his way of organizing code that probably looks familiar to most of us using the framework today. In simple terms: he took most of his business and query logic and put it in his Models. Leaving HTML with what HTML is good at, and Controllers to specifically shuffle data from Models to Views. Today, we have other best practices like Presenters and Concerns to help alleviate some bloat in Models.