This version of Vestibule is read only. It represents an archive of the community effort to produce content for Ruby Manor 4.

Patterns to deal with big ActiveRecord models

updated over 7 years ago; latest suggestion over 7 years ago

“Skinny controllers, fat models” is a well-known practice in the Rails community that everyone seems to follow. However, as your application evolves and your models grow, maintaining them can become less enjoyable than it used to be.

In the last few years, the community has been proposing patterns and techniques to deal with big AR models. Presenters, Service objects, Concerns or DCI are only a few examples of solutions suggested to alleviate the pain caused by gigantic models.

In this talk, we will critically explore these patterns in their varied flavours. We'll compare them in order to expose their strengths and weaknesses and you'll learn when and how to use them to keep your Rails models as pleasurable to deal with as the first day.


  • A8486651a974d7d9ecc35d25de96c7ee Chris Lowis suggests over 7 years ago

    This sounds very interesting and has the potential to give a lot of things to take away. Would it be possible to combine it with your other ActiveRecord proposal and maybe give a simple example, (with code?), of one of the patterns you'll present?

    I'm interested to hear more about how you will "critically explore" the patterns, given the time available - any chance of a brief outline of the talk?

  • The proposal author responds over 7 years ago

    I think it doesn't go against the anonymous policy to say that I'm the author of these three proposals (which are variations on the same subject):

    During the last six months I've been researching about the big-models issue in Rails. There's a fair amount of buzz in the community about how to deal with this problem and I though it would be interesting to study in depth each different view.

    In this talk in particular, I'd present and compare both the patterns that are part of the so-called Golden Path (Rails way) and those that deviates from it.

  • B68ce3695bb8dc29b9f9cb0dc0b721a5 Murray Steele suggests over 7 years ago

    It sounds to me like this talk would be very similar to this other one about ActiveRecord models and the rails way. Could you elaborate a bit more on how they might be different? If you'd like, we can put you in touch with the proposer of that talk so you can discuss and maybe even turn these talks into a double-header.