Phlip wrote: > Railsters: > > I heard a rumor that the incorrect answer, "Controller", was in > circulation out > there.
Where did you hear this rumor? At least within the Rails circles I'm aware of thin controllers and fat models are the mantra. > The C should be as thin as possible, like a telephone patch-board. The > View > should be thick, but only with Viewey things. > > The Model should be as fat as possible. Anything a user can do to the > biz rules, > thru the View, unit test can do to the Model directly. In the context of Rails' MVC this is what's generally promoted. However, Rails is not the only application of MVC out there and it certainly wasn't invented along with Rails. For example: I also work with the Mac OS X Cocoa framework, which is also very much MVC based. However, it's very common to have fat controllers. This is not a problem, and is highly promoted. The reason for this is that controllers in Cocoa serve a somewhat different role in the design of Cocoa based desktop applications. They are often used as delegates for windows, views, persistency related objects, etc. They are often used for handing notifications that are broadcast between objects, and there are many other uses for them. There's nothing wrong with this and it doesn't "break" MVC or anything else. It's just a different approach that makes sense in it's own right. > So the question is: Where did this disinformation come from? Do any > websites (or > >cough< books) out there actually say the biz rules belong in the > controller? I can't answer that, because I've not heard these rumors you speak of. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---