关于 asp mvc 应用程序的组织
我正在启动一个新的 Web 应用程序,它将由多个部分或模块组成。 我的客户希望能够将带有模块子集的应用程序重新分发给其他一些客户。我读到了有关 mvc2 中的区域的内容,这似乎就是我正在查看的内容。 我还想在业余项目中开发这些模块,并根据客户的规格构建正确的模块。
比我更有 mvc 经验的人可以确认这对于区域是可能的吗?
谢谢 马特奥
I'm starting a new web application that will be made of multiple parts or modules.
My client want to be able to redistribute the application with a subset of modules to some other clients. I read about Areas in mvc2 which seems to be what i'm looking at.
I would also like to develop those modules in side projects and have the right one build according to clients specifications.
Can someone with more experience than me with mvc can confirm that this is possible with areas.
thanks
mateo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
实际上,您不需要为此设置区域。如果您在解决方案中的单独项目中开发每个模块,它们将各自拥有自己的程序集。除非我误解了您的要求,否则这应该有效。
进一步澄清:区域通常用于将非常大的应用程序分成多个部分,每个部分可能有不同的开发团队。例如,堆栈溢出可能具有问题+答案引擎区域、角色和权限区域、登录和身份验证等。
You actually don't need areas for this. If you develop each module in a separate project within a solution they will each have their own assembly. This should work unless I'm misunderstanding your requirements.
To further clarify: areas are generally used to separate a very large application into sections that may each have a different development team. For example stack overflow might have the question + answer engine area, the roles and permissions area, login and authentication, and so on.
我认为每个模块应该是一个单独的项目(具有自己职责的单个程序集/DLL)。您可以像乐高积木一样“连接”每个模块:D。然后,要使用模块子集重新分发应用程序,您需要一个构建脚本,在其中指定最终产品中和外的模块。产品的每个版本都会有不同的形状(如乐高游戏),呈现不同的功能子集。
顺便提一下,MVC中Areas的概念是这样的:
I think each module should be a separate project (a single assembly/DLL with its own responsibilities). You'd "connect" each module as a lego :D. Then to redistribute the app with a subset of modules you'd have a build script where you specify the modules that are in and out of the final product. Each version of the product would come in different shapes (as in the lego game) presenting different functionality subsets.
Just to mention, the concept of Areas in MVC is this: