Another name for the "Skinny Controller, Fat Model" concept is a "Rich Domain Model". The opposite of this is the "Anemic Domain Model" anti-pattern which is written up nicely here:
http://martinfowler.com/bliki/AnemicDomainModel.html You want a rich domain model for all the reasons everyone has already mentioned: Easier to test, less duplication, less coupling, and so forth. Another important reason is reusability. Your domain model should encapsulate all of the information about the business domain you're modelling. If you've put important *business* logic in your controllers, or worse, your views, then when it comes to manipulate your model through the console, or through a different API completely, you'll be missing important pieces of the puzzle and unless you're careful, this logic will get duplicated in other layers. The best way to think about it is that your model represents the core of your software, and the views and controllers you begin with are only one way to interact with that model. Hope that helps! Cheers, Josh On 24/02/2011, at 10:36 AM, Warren Seen wrote: > It's also worth remembering that, while it's common in Rails apps, 1:1 > model/controller correspondence is not part of the MVC pattern, so moving all > complex logic into the model helps to keep your controllers DRY too. > > At a more fundamental level, FM/SC promotes good OO practice by loosely > coupling the controllers to the models - the less your controller knows about > your models, the better. > > On 24/02/2011, at 10:12 AM, David Goodlad wrote: > >> On Wed, Feb 23, 2011 at 7:26 PM, jamesl <ladd.ja...@gmail.com> wrote: >> But why is the practice of a Fat Model more acceptable than a Fat >> Controller? >> >> I agree with most of the arguments for a skinny controller, and generally >> adhere to this principle. The argument that resonates best with me, though, >> is ease of testing. Testing complex logic in controllers well is not an easy >> task, and that usually indicates that you're Doing It Wrong. >> >> Cheers >> Dave >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby or Rails Oceania" group. >> To post to this group, send email to rails-oceania@googlegroups.com. >> To unsubscribe from this group, send email to >> rails-oceania+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/rails-oceania?hl=en. > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby or Rails Oceania" group. > To post to this group, send email to rails-oceania@googlegroups.com. > To unsubscribe from this group, send email to > rails-oceania+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rails-oceania?hl=en. -- You received this message because you are subscribed to the Google Groups "Ruby or Rails Oceania" group. To post to this group, send email to rails-oceania@googlegroups.com. To unsubscribe from this group, send email to rails-oceania+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rails-oceania?hl=en.