WPF - Inter-module dependency
In WPF Prism, is it a good idea to have inter-module dependencies?
Example:
Home module is responsible for injecting views from a Menu modu开发者_StackOverflow中文版le, hence, Home module has a dependency on Menu Module.
Generally you want to avoid them. The idea of modules is that you should be able to remove a module and have the application run without it. I find that people are putting navigation / menus in the Shell itself because most modules you write will need that sort of service.
There are reasons to have module dependencies. You have to ask whether or not the application is still useful if you remove the module that is being depended on. If not, it's likely something that should be part of the shell and not segregated into a module.
精彩评论