I am working on a large(ERP level) Rails project. We have 150 tables and more than 150 models. It takes minutes to find a model. Should we add all models under the models folder or should we put them in different subfolders? Same thing goes for controllers and views.
我正在开发一个大型(ERP级)Rails项目。我们有150张桌子和150多个型号。找到模型需要几分钟。我们应该在models文件夹下添加所有模型还是应该将它们放在不同的子文件夹中?控制器和视图也是如此。
1 个解决方案
#1
2
See my answer to this question; with my second example, I talk about namespacing which is possible to do for controllers (and, subsequently, views) as well.
看看我对这个问题的回答;在我的第二个例子中,我谈到了可以为控制器(以及随后的视图)做的命名空间。
In the case of large applications, I think it would be a very good idea to namespace your models and controllers.
对于大型应用程序,我认为为模型和控制器命名空间是一个非常好的主意。
#1
2
See my answer to this question; with my second example, I talk about namespacing which is possible to do for controllers (and, subsequently, views) as well.
看看我对这个问题的回答;在我的第二个例子中,我谈到了可以为控制器(以及随后的视图)做的命名空间。
In the case of large applications, I think it would be a very good idea to namespace your models and controllers.
对于大型应用程序,我认为为模型和控制器命名空间是一个非常好的主意。