Yii Framework Forum: Fat models or fat controllers? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Fat models or fat controllers? Rate Topic: -----

#1 User is offline   SapporoGuy 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 177
  • Joined: 25-December 10
  • Location:Sappor Beer Refinery

Posted 28 March 2012 - 04:14 AM

Until now I've been using a MVC that had drawn the line pretty specifically, models were for basically only sql and controllers were for the logic so in a sense I had fat controllers and models slim in a sense.

What is the preferred way with Yii?
0

#2 User is offline   NaX 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 51
  • Joined: 13-January 12
  • Location:Johannesburg

Posted 28 March 2012 - 06:59 AM

To my knowledge Yii recommends the Fat model method.

I recommend you look at the following:

Docs: Best MVC Practices
http://www.yiiframew....best-practices

Forum: Fat Model Thin Controller
http://www.yiiframew...hin-controller/
0

#3 User is offline   SapporoGuy 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 177
  • Joined: 25-December 10
  • Location:Sappor Beer Refinery

Posted 28 March 2012 - 11:24 AM

Thanks for the study links!
0

#4 User is offline   jacmoe 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 2,601
  • Joined: 10-October 10
  • Location:Denmark

Posted 28 March 2012 - 05:04 PM

Fat models all the way! :)

It's not as easy as it sounds - my controllers seems to grow overweight with time, if I'm not careful..
"Less noise - more signal"
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users