Has anyone seen a real MVC based DNN module in the wild? I am building in-house custom modules and have done a simple MVC module which SMSs people a code to log them in, but I want to create one which has multiple module definitions and which will allow me to quickly and easily add new stuff without creating a million projects for each individual module.
It really seems like because DNN doesn't support MVC routing (kind of important..) you can only build single view modules in MVC, which makes it practically useless. (MVC is a way of organizing a project, a one view / one action MVC is like a one form WinForms/WPF project which can only have an OnLoad and OnUpdate event..)
Should I abandon this and learn ASP.NET WebForms to build stuff in DNN? I feel like if there just existed a non-trivial MVC project out there I could see how stuff is done, but customizing a .dnn manifest seems to break things and cause "Unknown error" things.
One thing I am finding really frustrating is the lack of clear terminology. Modules, Desktop modules, module definitions, module controls, packages, these all seem to have subtly different but crucial meanings. e.g. I am finding that if I upload a [package] with multiple [component type="Module"] inside it then I end up with a single entry in the Modules table but two entries in the DesktopModules table.
(Edited because anything in HTML tags seems to get filtered out) This doesn't work because in the DotNetNuke.Services.Installer.Installers.ModuleInstaller.cs ReadManifest() function it sets the FriendlyName for the DesktopModule to the FriendlyName of the Package; this means two DesktopModules are added with the same FriendlyName, and so when you go to add a module you get a "Key already exists" exception. Then if you go into the DesktopModule table and manually change the friendlyname to something different you have two desktop modules which share the same project, assemblies, folders, etc, allowing you to add two modules from the same project. I am currently trying to figure out what the heck DesktopModules are about to see if I am doing something crazy, but it appears to work well once I do this absurd hack.
Posted By Chris Kuliukas on 03 Jul 2019 11:13 PM It really seems like because DNN doesn't support MVC routing (kind of important..) you can only build single view modules in MVC, which makes it practically useless. (MVC is a way of organizing a project, a one view / one action MVC is like a one form WinForms/WPF project which can only have an OnLoad and OnUpdate event..)
I can't help with your other questions, but have a read of Andrew Hoefling's DNN MVC Module Routing. My understanding is MVC Routing is supported now.
Assuming you mean the new documentation at DNNDocs.com, I beleive it's still a work in progress, with the community contributing as and when they have time. I'm sure PRs would be welcomed 😀
Url.Action()
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.