What belongs into a prism infrastructure project?
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.
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.
精彩评论