Monolithic Modules #689
-
We are building many modules to support our enterprise app. Having hundreds of solutions and repos sounds unwieldy. Using internal modules seems like a poor choice. If we had a clearer understanding of the relationship between modules and the framework, I think I could move all our modules into a common folder. Has anyone tackled hundreds of modules? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
We had a discussion about this last week in the Gitter room... @nicpitsch: "I have read the Oqtane Blog and have watched the DNF.Projects video series. The Modules there and also the awesome-oqtane Module examples contain one Model only. I'm considering to implement a business app having multiple Models and quite some UI Components using Oqtane. From the architectural viewpoint I would suppose to implement the functionality with one Module, since the Models and UI Components are related with each other. On the other hand the terminolgy 'Modules' and 'Modularity' used in Oqtane could lead to the assumption such an app would consist of several Modules. So my question is how would you construct such an app containing multiple Modules and UI Components using Oqtane from the architectural point of view and why?" @sbwalker: "This is a great question... and based on the limited samples and videos, I can understand why people may have questions in regards to how to approach a larger solution on Oqtane. The answer, which is typical for most frameworks, is that there is not a single approach - it really depends on your preferences and requirements. That being said, it is important to understand that a "module" in Oqtane is a logical concept that can be physically implemented in a variety of ways. For example, the Blog sample module is physically implemented as an independent solution that contains only Blog assets. Whereas the Oqtane framework is a solution which contains a collection of different modules ( all related to the Admin Dashboard functionality ). So its really a matter of how various modules relate to one another and how granular the deployments of the modules need to be in your environment. If you want to be able to service and deploy each module independently from one another then you should physically separate them into different solutions/packages. If you want to build a custom application that is comprised of many different modules and deploy it as a single package, then you should include all of your modules in the same physical solution. Oqtane was designed with this flexibility in mind." @nicpitsch: "Thanks. The Modules are not independent. Do I understand it right from your answer, that it is possible to create an external Module having a structure similar to the Oqtane framework, containing itself Modules and depoly it like a Module?" @sbwalker: "yes that is correct. Within the external module Client project you would most likely want to create subfolders for each distinct module so that you can keep the razor components organized. These can all be compiled into a single DLL and on startup Oqtane will automatically find all of the modules within the DLL." @PoisnFang: "right, to separate the Modules in a single project they have to be in their on unique namepsaces. I have done that with mine. One solution with 2 Modules." |
Beta Was this translation helpful? Give feedback.
-
Re-reading this left my mind blown. I was doing it the hard way. I created a Pets external module, then put three 'modules' in it, and oqtane picked it up perfectly. |
Beta Was this translation helpful? Give feedback.
-
this is great news! So we can have a mono-repo for our modules and separate them out by namespace. Perfect! |
Beta Was this translation helpful? Give feedback.
-
Perhaps this diagram helps explain the concept: |
Beta Was this translation helpful? Give feedback.
-
Is there a way to set values for all the razor components in a module? I have 5 razor components in my module and I am putting this in all of them.
I'm sure I can create a base class, but is there something where I can set properties for all of them? |
Beta Was this translation helpful? Give feedback.
-
The appropriate solution is to create a base class. |
Beta Was this translation helpful? Give feedback.
-
@nohorse I think this discussion has been answered. |
Beta Was this translation helpful? Give feedback.
-
Hello, if I add a new module in the project by creating a new folder under modules I do not see it immediately, even if I rebuild the project, but I see it in oqtane after several hours. Do I have to refresh something to force, such as a cache? Thank you |
Beta Was this translation helpful? Give feedback.
@nohorse I think this discussion has been answered.