-
I am Working on a Project where I have created multiple Modules. What are the different ways to achieve it, and which one is the best? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You mentioned "inter-module communication" which usually refers to passing state between different components at runtime. However I think what you are actually referring to is how to leverage repositories, services, etc... from different modules during development (which is something completely different). The easiest way to accomplish your development goal is to create an Oqtane project which contains multiple modules:
Note that your solution will be compiled into 3 assemblies (which internally contain both Module1 and Module2 implementations) - and these need to be deployed to the Oqtane Framework /bin folder. Using this approach you can easily reference Module1's services, etc... from Module2 and vice versa. If you look closely at the folder organization above you will notice that it matches the Oqtane Framework's folder organization - the Oqtane Framework is essentially a project which contains many modules. |
Beta Was this translation helpful? Give feedback.
-
@kasif based on your screenshot it looks like you have created 4 different modules. It also looks like you renamed the Oqtane Framework folder to "oqtane.framework-5.1.2" which will cause difficulty with the module "Package" projects debug.cmd file which does post-build deployment of DLLs to the appropriate locations based on folder path. My earlier post was explaining the a single module solution can contain multiple modules. So basically you can take the code from your 4 modules and merge them into a single module solution using the folder organization I outlined above. |
Beta Was this translation helpful? Give feedback.
You mentioned "inter-module communication" which usually refers to passing state between different components at runtime. However I think what you are actually referring to is how to leverage repositories, services, etc... from different modules during development (which is something completely different).
The easiest way to accomplish your development goal is to create an Oqtane project which contains multiple modules: