Hi,
It might be possible to create a Shared Service that could be in charge of showing a view inside a new window to manage theNotes when requested. As all the logic to do so will be encapsulated inside the service, the modules could be kept decoupled from each other. You will need to develop the logic of the service that will be in charge of doing this including how to manage the popup, pass information back and forth, etc. but you will also to be able to customize it according to your needs. Regarding this same topic, I just described another possible approach in yourprevious thread that you might find useful.
About your second question, I believe we should first make a distinction between a module and a infrastructure project. Based on my understanding, in a Prism application architecture an "Infrastructure" project is a project which contains resources which are "directly" used by decoupled modules and / or the main application. Such resources usually include common interfaces, common identifiers, helpers, prism extensions, etc, that are globally used. They rarely include specific implementations (like in this case Shared Services) and they are not modules (thus, they do not register classes in the container by they own.)
Following this same concept, the structure of a solution with a Shared Service could be similar to this:
- Infrastructure (not a module) - Contains IService only.
- Main project - Reference Infrastructure
- ServiceModule - Reference Infrastructure - ImplementsService and registers it to the container though IService
- ConsumerModule - Reference Infrastructure - Consumes anIService injected by the container
As you can see, ServiceModule and ConsumerModule don't reference each other; however ConsumerModule can still use the service because both knows theIService interface. This is the advantage of using a Infrastructureproject. The Service implementation is not in the Infrastructure project to allow decoupling the service implementation from the modules. Like this, if in the future you need to change the service, you can replace theServiceModule without affecting the ConsumerModule. Also, this will allow you to port theServiceModule to other applications, as long as you define the corresponding interface in theInfrastructure of that application too.
As you mentioned, by following this kind of pattern and by properly decoupling the modules, you can be able to create "universal" modules that could be reused in several of your applications.
Regards,
Damian Cherubini
http://blogs.southworks.net/dcherubini