问题描述
我将在我的 ZF 应用程序中创建管理屏幕.我应该使用单独的控制器还是单独的模块来包含管理部分?
I am going to create Admin screens in my ZF app.Should I used separate controller or separate module to contain admin section?
我的假设是这与应用程序的大小有关.如果它很小,在管理部分使用控制器就可以了,不是吗?
My assumption is that this has something to do with application size.If it's small, using a controller for Admin part is ok, isn't it?
推荐答案
我看不出这有什么问题.将每个屏幕作为一个单独的操作,一个 AdminController 就足够了.
I don't see the problem with that. Keeping each screen as a separate action, just an AdminController should suffice.
另一方面,如果管理区域可能会扩展到更大的应用程序,您不妨现在为其创建一个单独的模块.
On the other hand, if the admin area is likely to grow to a much larger application, you might as well create a separate module for it now.
这篇关于Zend 中的管理屏幕:控制器还是模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!