News for hackers. Stuff that matters.
Re:Where's Your Business Logic? by Jarred on Thursday June 28, 2012 @02:16PM (#4173047)
I prefer fat models to fat controllers because methods in the controller are much more difficult to reuse than in the model.

When models get too fat, I usually create modules that break up the bulk of the model into smaller chunks. Meaning, for example, if it has lots of validations, then maybe I'll move those validations over to a module and then extend/include the module back into the model. I haven't needed to use these modules in any other class, but less code in one place is usually easier to read than more code. If the language you're using isn't Ruby, then a module is basically a means of doing multi-inheritance.

Note though -- I didn't read the article

There are no comments on this comment yet.