Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Razor Assembly #2613

Closed
1 task done
SkyeHoefling opened this issue Mar 7, 2019 · 3 comments
Closed
1 task done

Deprecate Razor Assembly #2613

SkyeHoefling opened this issue Mar 7, 2019 · 3 comments
Milestone

Comments

@SkyeHoefling
Copy link
Contributor

SkyeHoefling commented Mar 7, 2019

Part of: #2599

Description of problem

To support Razor Pages Modules in DNN we need to deprecate the DotNetNuke.Web.Razor assembly and modules. This module pattern is not used by as much as other module types. See Migration plan for how to move forward if you have modules in this pattern

Migration Plan

If you have a DotNetNuke.Web.Razor module you will be able to migrate it to a Razor Pages Module with minimal work since they are very similar.

Reason for Deprecation

In the parent feature #2599 it cites there will be confusion between Razor Modules and Razor Pages Modules. It will be best to deprecated the old pattern as we implement a new pattern.

Description of solution

Add API deprecation warnings to all public and protected APIs

  • Deprecated in 9.3.1, will be removed in 11.0.0, use Razor Pages instead

Example of DotNetNuke.Web.Razor.DotNetNukeWebPage

[Obsolete("Deprecated in 9.3.1, will be removed in 11.0.0, use Razor Pages instead")]
public abstract class DotNetNukeWebPage : WebPageBase
{
    [Obsolete("Deprecated in 9.3.1, will be removed in 11.0.0, use Razor Pages instead")]
    protected internal DnnHelper Dnn { get; internal set; }

    [Obsolete("Deprecated in 9.3.1, will be removed in 11.0.0, use Razor Pages instead")]
    protected internal HtmlHelper Html { get; internal set; }

    [Obsolete("Deprecated in 9.3.1, will be removed in 11.0.0, use Razor Pages instead")]
    protected internal UrlHelper Url { get; internal set; }

    [Obsolete("Deprecated in 9.3.1, will be removed in 11.0.0, use Razor Pages instead")]
    protected override void ConfigurePage(WebPageBase parentPage);

    [Obsolete("Deprecated in 9.3.1, will be removed in 11.0.0, use Razor Pages instead")]
    public dynamic Model { get; set; }
}

List of Deprecated Assemblies

DotNetNuke.Modules.RazorHost
DotNetNuke.Web.Razor

List of Deprecated Classes

DotNetNuke.Web.Razor.DotNetNukeWebPage
DotNetNuke.Web.Razor.DotNetNukeWebPage<T>
DotNetNuke.Web.Razor.RazorEngine
DotNetNuke.Web.Razor.RazorHostControl
DotNetNuke.Web.Razor.RazorModuleBase
DotNetNuke.Web.Razor.RazorModuleControlFactory
DotNetNuke.Web.Razor.Helpers.DnnHelper
DotNetNuke.Web.Razor.Helpers.HtmlHelper
DotNetNuke.Web.Razor.Helpers.UrlHelper

List of Affected Assemblies

DotNetNuke.Modules.DDRMenu

Affected version

  • 9.3.1
@SkyeHoefling SkyeHoefling changed the title Deprecate Razor Assembly [DotNetNuke.Web.Razor] Deprecate Razor Assembly Mar 7, 2019
@mitchelsellers
Copy link
Contributor

The only additional recommended action on this is that we include specific instructions on replacement methods/calls if/when possible. Understanding that it might not be possible at 9.3.1, but should be updated as the new API's come through

@mitchelsellers mitchelsellers added this to the 9.3.1 milestone Mar 8, 2019
@SkyeHoefling
Copy link
Contributor Author

@mitchelsellers I agree 100%. I am going to update the parent spec to include a deprecation note that we can maintain as the spec grows. Ideally we will have documentation in the spec in how to migrate from Razor to Razor Pages which will be relatively painless

@tonycobb
Copy link

currently my menus use "@inherits DotNetNuke.Web.Razor.DotNetNukeWebPage" what does that change too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants