棱镜基础设施项目包含哪些内容?

发布于 2024-10-03 05:28:48 字数 372 浏览 4 评论 0原文

我是 prism 的新手,想知道如何组织业务线应用程序的项目/模块。

在某些地方,我读到(WCF)服务的接口应该放入基础设施项目中。那么,由于服务接口确实需要数据对象(客户、订单等)的声明,这意味着我也需要将它们放入基础设施项目中?

由于这个项目会变得很大并且包含很多数据类型,因此将这些数据对象和服务接口分组到不同的项目中不是更明智吗?

但这些可能不再是“棱镜基础设施项目”,不是吗?

现在我的猜测是:我需要几个包含按域分组的服务接口和数据类型的项目,以及几个包含视图模型和视图的模块(按域分组,可能是相同的)?

基础设施项目将保留给一些全球帮助者的东西吗?

我发现如何正确地将内容分组到域中是 Prism 面临的最艰巨的挑战之一。

I'm new to prism and wonder how to organize the projects/modules for a line-of-business application.

In some places I read that the interface to the (WCF) service should be put into the infrastructure project. So, since the service interfaces do need the declarations of the data objects (customers, orders, etc) this would imply that I need to put those into the infrastructure project, too?

Since this project will grow large and contain a lot of data types, wouldn't it be more advisable to group those data objects and service interfaces into different projects??

But these probably would not be "the prism infrastructure project" anymore, wouldn't they?

Right now my guess would be: I need several projects containing service interfaces and data types grouped by domain, and several modules containing the viewmodels and views (grouped by domain, probably the same ones)?

And the infrastructure project would be reserved for some global helper stuff?

I find how to properly group stuff into domains to be one of the toughest challenges about prism.

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

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

发布评论

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

评论(1

一百个冬季 2024-10-10 05:28:48

基础设施项目应该与您的业务服务、数据契约等隔离,它应该只包含帮助构建应用程序的类,并且应该可以在其他项目中重用。

同样,您可以定义多个基础设施项目,为框架(即 Wpf、Asp)分开。网络和通用。

对于 WPF/Prism,基础设施包含调度程序、委托命令、区域、ModuleMapper(将视图加载和卸载到区域)等服务的实现。

Infrastructure project should be isolated from your business service, data contracts etc and it should only contain the classes in helping build the application and should be reusable across other projects

Again you could define multiple infrastructure projects, separate for the framework i.e, Wpf, Asp.Net, and Common.

For WPF/Prism, Infrastructure contains implementations of services for Dispatcher, Delegate Commands, Regions, ModuleMapper (loading and unloading of views into regions), etc.

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