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

That's very debatable, and pretty rails-specific, IMHO. Conventional wisdom in other ecosystems is instead to have a business logic layer between your controller and your persistence layer. I've always found this to be good advice, as it makes the code more testable and makes reasoning about manipulating different models in the same operation easier.


The Rails models ARE the "business logic layer" between the controller and the persistence layer (the database itself).

I don't want to get into exactly what MVC should mean and whether any particular framework does it right though.


That's how they're traditionally used, but this does not mean doing something cleaner is impossible.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: