Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"Models are intended to serve only as an abstraction to the database"

I'm really tired of hearing this unqualified argument. Fat models is not a creed. It's a practical and natural design choice that we've made because it fits real world workflows best. Do you really want to be copy/pasting your order total calculation logic into 5 separate controller actions? Obviously not. And fat models doesn't mean 800 line source files. On reasonably sized Rails applications the logic gets bundled into nicely organized and maintainable concerns.



I am not against fat models. However, the point of separating code into tiers makes it cleaner. The author does approve of concerns. His point is models are becoming too fat over time and people need to follow techniques like concerns and use cases to take out business logic. Essentially something already well known in other platforms is unknown in these communities.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: