Module packaging constraints (relationship between module definitions, assemblies, namespaces, index.razor etc) #4236
-
I am trying to get my head around what the constraints are around packaging modules (e.g. "can I include more than one module definition in a single assembly"), and it reveals I don't really understand the Oqtane page lifecycle and how Oqtane knows which razor components should be rendered on a given page. (coming from many years developing for DNN, I am used to a loose complex model where multiple module types could be packaged together, and the relationship between all the parts specified in a manifest file, but Oqtane has a much simpler model, no manifest, and more reliance on conventions it seems ... quite a relief in many ways!) My conclusion so far is:
Is that about right? I guess then that the way to package a "family" of related modules would be to generate a single NuGet package containing all the assemblies of those modules? In the Nuget package meta-data (e.g. .nuspec file) there is a version number and unique ID, but hopefully can be set however I want and don't have to related to the module definition version etc? PS: if my understanding above is correct, why is there no unique constraint on ModuleDefinitionName in the ModuleDefinition table? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
@lanthonyneville short answer, yes you can. One module set IModule should reside in it own namespace. IModule is read at startup and the ModDefs created/updated HTH |
Beta Was this translation helpful? Give feedback.
@lanthonyneville short answer, yes you can. One module set IModule should reside in it own namespace.
Multiple Modules->
namespace Mycompany.Module.ModuleSuite IModule -> ModuleInfo - Index; Edit; Settings
namespace Mycompany.Module.ModuleSuite.ModuleB IModule -> ModuleInfoB - Index; Edit; Settings
namespace Mycompany.Module.ModuleSuite.ModuleC IModule -> ModuleInfoC - Index; Edit; Settings
IModule is read at startup and the ModDefs created/updated
HTH