关于 asp mvc 应用程序的组织

发布于 2024-09-12 20:30:30 字数 192 浏览 8 评论 0原文

我正在启动一个新的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

泪冰清 2024-09-19 20:30:30

实际上,您不需要为此设置区域。如果您在解决方案中的单独项目中开发每个模块,它们将各自拥有自己的程序集。除非我误解了您的要求,否则这应该有效。

进一步澄清:区域通常用于将非常大的应用程序分成多个部分,每个部分可能有不同的开发团队。例如,堆栈溢出可能具有问题+答案引擎区域、角色和权限区域、登录和身份验证等。

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.

怼怹恏 2024-09-19 20:30:30

我认为每个模块应该是一个单独的项目(具有自己职责的单个程序集/DLL)。您可以像乐高积木一样“连接”每个模块:D。然后,要使用模块子集重新分发应用程序,您需要一个构建脚本,在其中指定最终产品中和外的模块。产品的每个版本都会有不同的形状(如乐高游戏),呈现不同的功能子集。

顺便提一下,MVC中Areas的概念是这样的:

为了适应大型项目,ASP.NET
MVC 允许您对 Web 进行分区
将应用程序分解为更小的单元
被称为区域。领域
提供一种分离大型 MVC 的方法
Web 应用程序变得更小
功能分组。一个区域是
有效地内部的 MVC 结构
应用。一个应用程序可以
包含多个MVC结构
(区域)。

比如单个大型电商
应用程序可能分为
代表店面的区域,
产品评论、用户帐户
行政管理和采购
系统。每个区域代表一个
整体的独立功能
应用程序。

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:

To accommodate large projects, ASP.NET
MVC lets you partition Web
applications into smaller units that
are referred to as areas. Areas
provide a way to separate a large MVC
Web application into smaller
functional groupings. An area is
effectively an MVC structure inside an
application. An application could
contain several MVC structures
(areas).

For example, a single large e-commerce
application might be divided into
areas that represent the storefront,
product reviews, user account
administration, and the purchasing
system. Each area represents a
separate function of the overall
application.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文