Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Where's The Best Place For The Models

$
0
0
Hi guys! Happy New Year!

I have the Admin module at my application and within in I have for now two another modules. Each of them have bunch of models ( Article module has 5 models and Shop module has 10 models ). Now all these models placing at protected/models folder, so it looks pretty redundant. By the way, the module main principle is corrupted, because the modules become not portable as I have all the models separated at another directory.

I find out the most methods I use in model classes at admin panel I dont using at the site itself. I mean dozens of filters, validators etc. So should I really separate 'em at protected/models folder or I should place 'em at proper protected/modules/admin/modules/article/models and protected/modules/admin/modules/shop/models folders ?

I worry because I imagine if I have for example 10 modules then it might be 50 models at one folder.

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>