Skip to content

First code submission for MVC Pipeline#6749

Open
donker wants to merge 252 commits intofeature/mvc-pipelinefrom
feature/mvc-pipeline-old
Open

First code submission for MVC Pipeline#6749
donker wants to merge 252 commits intofeature/mvc-pipelinefrom
feature/mvc-pipeline-old

Conversation

@donker
Copy link
Copy Markdown
Contributor

@donker donker commented Oct 3, 2025

Core Purpose

Introduces a new ASP.NET MVC-based rendering pipeline as an alternative to the traditional WebForms pipeline, allowing DNN to modernize its architecture while maintaining backward compatibility.

Key Features

Dual Pipeline Architecture:

  • Traditional WebForms pipeline continues through /default.aspx
  • New MVC pipeline routes through /DesktopModules/Default/Page/{tabId}/{locale}

Video showcase the general usage

Module Support:

More info about MVC Module Control Implementation
Razor+ Module Development Guide

  • HTML module converted to MVC
  • Sample modules demonstrating Razor+, MVC and SPA patterns

How to compile Samples

Configuration:

  • Pipeline selection at portal and page level
  • Settings UI integrated into Site and Page Settings
  • URL rewriter modifications to route based on pipeline settings

More info about MVC pipeline (routing / settings)

New MVC Pipeline Projects

DotNetNuke.Web.MvcPipeline.csproj - New core MVC pipeline library

  • Skins : Html Helpers (replacement for skin objects)
  • Containers : Html Helpers (replacement for skin objects for containers)
  • ModelFactories : construction of the Page Model (Model of the DefaultController)
  • ModuleControl : Module Control infrastructure
  • Utils : MvcViewEngine (Replacement for RazorEngine based on MVC 5 and can only be used inside HttpContext)
  • UI/Utilities : MvcClientAPI (replacement for ClientAPI for mvc)

Razor Module Sample

  • Razor-based module sample project

NewDDRMenu

  • Fork of DDRMenu for MVC navigation support (WIP)

Core Platform Projects

DotNetNuke.Library

  • Added Site and Page pipeline settings
  • Added Module Control settings
  • URL rewriter changes to route based on pipeline settings
  • Update SPA (Html5) to use new CDF

DotNetNuke.Abstractions

  • Added PagePipeline property to IPortalSettings

DotNetNuke.Web.Mvc

  • Integration with new MVC pipeline
  • Make actual DNN MVC modules run on the MVC Pipeline

HTML

  • Add support for MVC Pipeline rendering
  • Add MVC views and controllers
  • This is implemented as true MVC (with form tags) using AJAX

Dnn.PersonaBar.UI

UI for pipeline settings in Site and Page Settings

DNNConnect.CKE

  • HTML helper additions for CKEditor in MVC context

Skins/Aperture

  • Added mvc suport to the skin (Razor files)

Skin conversion guide

Website

  • MVC Razor Layout
  • MVC Default skin
  • mvc.js minimal stuff needed for dnn to work
  • Terms and privacy pages (razor files)
  • DefaultController
  • ModuleActions Controller

AdminExperiance

  • settings ui for new settings
  • mvc controls for persona and edit bar

This PR is a first submission of the work of the MVC Pipeline team to bring the main project up to date with what has been developed in a forked repo.

Documentation

MVC Module Control Implementation
MVC pipeline (routing / settings)
Razor Module Development Guide
How to compile Samples

DNN MVC Pipeline - Developer User Guide

donker and others added 30 commits March 20, 2025 12:03
client dependecy for mvc (because it not exist in nuget)
sachatrauwaen and others added 15 commits February 2, 2026 17:30
# Conflicts:
#	DNN Platform/DotNetNuke.Web.Mvc/Framework/Controllers/DnnController.cs
#	DNN Platform/DotNetNuke.Web.Mvc/Framework/Modules/ResultCapturingActionInvoker.cs
#	DNN Platform/DotNetNuke.Web.Mvc/Routing/MvcRoutingManager.cs
#	DNN Platform/Library/Entities/Portals/PortalSettings.cs
#	DNN Platform/Library/Entities/Portals/PortalSettingsController.cs
#	DNN Platform/Library/Entities/Urls/AdvancedUrlRewriter.cs
#	DNN Platform/Library/UI/Modules/Html5/Html5HostControl.cs
#	DNN Platform/Library/UI/Modules/Html5/Html5ModuleControlFactory.cs
#	DNN Platform/Modules/DDRMenu/Common/DNNContext.cs
#	DNN Platform/Modules/DDRMenu/Localisation/Localiser.cs
#	DNN Platform/Modules/DDRMenu/MenuBase.cs
#	DNN Platform/Modules/DDRMenu/TemplateEngine/TemplateDefinition.cs
#	DNN Platform/Modules/HTML/Components/HtmlTextController.cs
#	DNN Platform/Providers/HtmlEditorProviders/DNNConnect.CKE/Web/EditorControl.cs
#	Dnn.AdminExperience/Dnn.PersonaBar.Extensions/admin/personaBar/Dnn.SiteSettings/App_LocalResources/SiteSettings.resx
@sachatrauwaen
Copy link
Copy Markdown
Contributor

I’d like to check the status of this PR. There hasn’t been any review activity for several months—are there any issues or blockers? How can I help move things forward?

It might also be worth bringing this up during a TAG meeting ?

I completely understand that reviewing this PR is a significant effort. At the same time, on the otherhand inoticing quite a few major changes being made elsewhere, which also require substantial merge work on my side.

I believe it’s generally more efficient to process PRs in order (except for bug fixes, of course). Otherwise, each new PR tends to create additional merge overhead for those still pending.

@thienvc
Copy link
Copy Markdown
Contributor

thienvc commented Apr 4, 2026

I’d like to check the status of this PR. There hasn’t been any review activity for several months—are there any issues or blockers? How can I help move things forward?

It might also be worth bringing this up during a TAG meeting ?

I completely understand that reviewing this PR is a significant effort. At the same time, on the otherhand inoticing quite a few major changes being made elsewhere, which also require substantial merge work on my side.

I believe it’s generally more efficient to process PRs in order (except for bug fixes, of course). Otherwise, each new PR tends to create additional merge overhead for those still pending.

I wish this PR was a custom package that could be installed and uninstalled like a plugin.
If that were the case, I think it wouldn't affect the official version.

/// <summary>
/// Base controller for DNN MVC page controllers, exposing common services and portal context.
/// </summary>
public abstract class DnnPageController : Controller, IMvcController
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar question here for the fate of the existing IDNNController and related items, as I can see a lot of confusion without some level of guidance being provided at a programming perspective with different behaviors and purposes. For example this ONLY provides PortalSettings the legacy one provides much more rich context (User, etc)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is indended to work in mvc pipeline, real mvc. IDNNController is for webforms , have a reference to a Page. Dous not use standard mvc. Use hacks in mvc to write the output to a string and generate module actions in a way that is not compatible with real mvc.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donker @valadas @bdukes @david-poindexter given the above comment from @sachatrauwaen do we need to think about the addition of an Obsolete or other attribute on the others? I'm worried about multiple items that do similar things and those not being aware of what exactly this is, or this important difference

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting that we mark the current MVC pattern as obsolete?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe? I'm worried that with multiple ways of doing something, and/or without doing so, it is going to create even more confusion? Maybe it's too early for that?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I think it's too early for that. We're just going to have to live with two MVC patterns side-by-side for a while.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the mvc pipeline there is a way to run actual mvc modules as child controllers. But with some limitations. And when looking at the way actuel mvc modules are implemented is i think the only way that was possible in mvc 3. It's really bad hacking witch bring a lot of restructions to the real MS MVC. So opinion, is that depreciating the actual mvc modules is not a bad thing. Also because this patern can not work in dotnet core (because in use child controllers witch is not available in dotnet core).

Depreciating the actual mvc modules, can also make this PR smalller.

/// Builds an edit URL for the current module instance.
/// </summary>
/// <returns>The edit URL.</returns>
public string EditUrl()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I echo @valadas comments on this duplication of exploding items that are already there, the long-term maintenance of this, as we have seen with other changes, is not exactly "fun". I would prefer exposing the ModuleContext and leaving it at that personally

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This a base controller is specifically for module controls implemented as a child controller. But is in reality not realy the recommended way because removed by MS in dotnet core. Maybe better to remove it ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think in many ways, yes, it would be a "bigger lift" for somone converting an existing module, but at the same time, very easy document using ModuleContext

.Register();

/*
if (Host.CdnEnabled && !string.IsNullOrEmpty(jsl.ObjectName))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commented out code should be removed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this commended code, use DnnJsIncludeFallback with is actually not implemented in the mvc pipeline. Do you think this have some sense this days ? Is it needed to be implement in the mvc pipeline ?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may have already been lost with @donker's CDF revamp.

@sachatrauwaen
Copy link
Copy Markdown
Contributor

I’d like to check the status of this PR. There hasn’t been any review activity for several months—are there any issues or blockers? How can I help move things forward?
It might also be worth bringing this up during a TAG meeting ?
I completely understand that reviewing this PR is a significant effort. At the same time, on the otherhand inoticing quite a few major changes being made elsewhere, which also require substantial merge work on my side.
I believe it’s generally more efficient to process PRs in order (except for bug fixes, of course). Otherwise, each new PR tends to create additional merge overhead for those still pending.

I wish this PR was a custom package that could be installed and uninstalled like a plugin. If that were the case, I think it wouldn't affect the official version.

We look at it, but not possible do the the use of lot of code that is not exposed for external project and need some UI changes in the core

/// <summary>
/// Gets the current portal settings.
/// </summary>
public PortalSettings PortalSettings
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer that we only expose IPortalSettings (i.e. via the interface)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tryed, but endup in a nogo, because ActiveTab was not exposed thue IPortalSettings and found no way to get ActiveTab an oter way. Or do you know a way to get ActiveTab without PortalSettings ?

Copy link
Copy Markdown
Contributor

@bdukes bdukes Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TabController.CurrentPage is what I've been using. We want to have a better way to get that context, but it hasn't been fully designed yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

6 participants