DEV Community

Discussion on: Opinionated Tips for Maintainable Rails Applications?

Collapse
 
choncou profile image
Unathi Chonco

I've assumed the opinion that nowadays, we prefer to keep both the model and controller skinny, because heavy business/domain logic can often be extracted out into service/query/form objects. Making those pieces of functionality more reusable

What is your reasoning to only keeping one of the two skinny?

Collapse
 
antonmelnyk profile image
Anton Melnyk

Haha, my post is more for the sake of the joke then real complain.

I do agree, it's totally possible to have those classes skinny as have the logic in PORO.

Still I can imagine for most more or less big projects models are inevitably going to get fatter just because how many responsibilities has Active Record class.

Thread Thread
 
choncou profile image
Unathi Chonco

😂

Yup this does eventually happen in big projects. I've found that having some kind of maintainable conventions help most with keeping new projects easy to work on; and when trying to create some kind of consistency in refactoring the legacy/bigger projects; or building new features.

Keeping them skinny in the long term definitely can be tough.