开发者

How to organize MVC structure with big amount of models/controllers

开发者 https://www.devze.com 2023-03-06 11:13 出处:网络
I have got a project with about 50 controllers and 开发者_StackOverflow社区60 models. It is quite difficult to work in that mess.

I have got a project with about 50 controllers and 开发者_StackOverflow社区60 models.

It is quite difficult to work in that mess.

How can I improve that scructure?

Now I am creating namespaces for some logical parts of my application and store them in separate folders. But for models this have got some side effects.


You can organize your classes in subfolders - you don't even need to structure them into submodules (but you can if you want to).

See this other question for details.


Refactoring is a discipline that deals with that kind of problem.

Consider this book.


you can refactor your code using namespace.

0

精彩评论

暂无评论...
验证码 换一张
取 消