如何组织企业级复合应用程序 (CAG)

发布于 2024-09-03 19:56:29 字数 272 浏览 2 评论 0原文

CAG 文档中的所有快速入门和 RI 示例都很好,但我缺少更多企业级示例。

假设我们有 40 多个模块,每个模块都包含代理、外观、演示模型、模型和视图。每个模块还调用特定于模块的 WCF 服务,该服务将托管在 IIS 或独立控制台主机中。我们的方法是将 UI 模块、服务模块和相关测试纳入一个解决方案中,以便它们可以与其他模块分开开发和测试。

我的问题是当服务位于单独的模块中时应如何完成服务的托管,以及当我按 F5 时如何实际运行单独的模块与其余应用程序模块。这有最佳实践吗?我想以前已经做过了?

All QuickStarts and RI examples in the CAG documentation are good but I lack the more Enterprise scale examples.

Let's say we have 40+ modules, each containing a Proxy,Facade,PresentationModel,Model and Views. Each module also makes calls to a Module-specific WCF service which is to be hosted in IIS or in a stand-alone console host. Our approach have been to include the UI-module, service-module and related tests into one solution so they can be developed and tested separately from other modules.

My problem is how the hosting of the services should be done when the services are in separate modules and how to actually run the separate module together with the rest of the application-modules when I press F5. Is there a best practise for this? I guess it has been done before?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

甜尕妞 2024-09-10 19:56:29

您当然可以将每个模块托管为服务点的应用程序或虚拟目录实例,但我想要说的是,您是否允许解决方案分区的开发“便利性”决定您的服务的生产架构?我们通常基于层而不是模块分区来处理此问题 - 换句话说,您将拥有一个包含域/模型的项目和一个包含服务的项目,然后每个“模块”都可以引用公共服务池。我想这取决于模块的相互关联程度,有多少交叉通信等等。

每个服务都可以配置为在不同的端口或目标上运行,但我再次感觉到,您的问题可能源于服务的体系结构,您可能受益于跨模块共享的公共服务项目。

You can certainly host each module as an application or virtual directory instance for the service points, but I guess the thing to say is, are you allowing the development "convenience" of solution partitioning dictate the production architecture for your services? We've typically handled this based on layers rather than module partitions - in other words, you would have a project with the domains/models and one with the services, then each "module" could reference the common pool of services. I guess it depends on how interrelated modules are, how much cross communication there is, etc.

Each service can be configured to run on different ports or targets, but again, I sense perhaps your issue stems from the architecture of the services and you might benefit from having a common service project that is shared across modules.

╭ゆ眷念 2024-09-10 19:56:29

我们最终得到了一个相当简单的解决方案,其中我们将托管项目作为“启动”项目包含在解决方案中。该项目设置为不构建并且具有模块的依赖关系。

所有服务 DLL: 都输出到一个公共文件夹,主机项目在其中动态加载它们,查找 ServiceContract 属性并启动主机。

We ended up with a fairly simple Solution where we include the Hosting project as a "startup" project in the solution. The project is set to not build and to have dependencies of the module.

All service DLL:s are outputed to a common folder where the host project is dynamically loading them, look for the ServiceContract attribute and starts the host.

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