Controller With Only 1 Object

Hi,

I was reading these rules from Thunderbolt Labs and there Rails app rules …

http://thunderboltlabs.com/blog/2013/01/23/5-simple-rules-to-good-oo-in-rails/

I was just wondering how feasible these rules could be when building a Yii app? Would it work?

How can a controller only ever instantiate one object, how can it do all the other stuff that is needed?

James.

Guys, rules are good! Rules help control the fun! © Monica

In real life, however, it’s hard to follow the rules 100%, so one must remember them and break (if required) wisely.