ActiveRecord architecture

Look at my reply. It’s a general one but may be of help here.

http://www.yiiframework.com/forum/index.php?/topic/4190-datetime-handling/page__view__findpost__p__50207

I feel like we are on the good track until someone says we’re breaking mvc concept :lol:

Just kidding. :rolleyes:

I like your ideas! For me the thing is that i lack the knowledge of some of yii’s internals and concepts so for now i will manage all things in one place by extending AR class.

Then i’ll look what comes up and what can be put into a separate class/layer.

I’ll keep it simple, small and quickly configurable.

So conclusions:

  1. Data Integrity Layer will be in internally configurable and implemented by overriding __set and __get methods.

  2. Data Validation Layer stays untouched. We have scenarios and validate() method.