Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

Fat models and skinny controllers or fat controllers and skinny models which is the better approach while using MVC in developing a web application?

Please justify your answer. Any effort will be appreciated and thanks in advance!

user-image
Question added by Rashid Anwar , senior php developer , sparx it solution pvt ltd.
Date Posted: 2013/09/25
Arief Shah
by Arief Shah , Software Developer/Project Manager , Durat

Everything SKINNY that is what MVC is all about. Be informed that IoC (inversion of Control) is most effective when everything is seggregated into pieces.

 

 

rizwan yahya
by rizwan yahya , Team Lead , Logo Design Guru

I think fat models are better then fat controlers. below para should give you some idea how it should be like that.

 

"In a well-designed MVC application, controllers are often very thin, containing probably only a few dozen lines of code; while models are very fat, containing most of the code responsible for representing and manipulating the data. This is because the data structure and business logic represented by models is typically very specific to the particular application, and needs to be heavily customized to meet the specific application requirements; while controller logic often follows a similar pattern across applications and therefore may well be simplified by the underlying framework or the base classes."

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.