Forum


HomeHomePremiumPremiumDevelopmentDevelopmentModule Templates for Web FormsModule Templates for Web Forms
Previous
 
Next
New Post
5/17/2016 5:33 AM
 

Hello,

I'm upgrading a DNN module from DNN 7 to 8. It's web forms based and I am gradually migrating to the code to Razor but for now I'd like to get it working on DNN 8.

While I'm at it, I thought i may as well move from VS2013 to VS2015.

 

My plan was to use install the DNN 8 templates:
https://visualstudiogallery.msdn.microsoft.com/bdd506ef-d5c3-4274-bf1d-9e673fb23484?SRC=VSIDE 

Then copy just the code over and rebuild the app under DNN 8. That way i get a nice clean DNN 8 installation for VS2015.

 

But the DNN 8 templates are for SPA and MVC. So what would be the best approach for upgrading?

Is it reasonable to Install say the MVC template and then alter it to use web forms?
i.e. add Edit.ascx/View.ascx/Settings.ascx and change the manifest to use those files, plus add references to use web forms.


Could I just move the project over to the DNN8 installation and open it in VS2015? Is there anything i need to be aware of, for example manifest changes?


Best Regards,

Steve

 
New Post
5/17/2016 5:38 AM
 

Hi Steve,

I'm personally not in a position to try helping you here, but I send a note to Scott about your question. I'm hoping he can shed some light.

Cheers,

Aderson

 
New Post
5/17/2016 5:53 AM
 

Hi Aderson,

OK great, thanks.

Steve

 
New Post
5/17/2016 8:24 AM
 

Steve,

You shouldn't need to upgrade your module to work on DNN 8 because DNN 8 is still based on webforms .  You may already know that.  

Your existing project will also work if moved to a DNN 8 environment assuming when you originally built it, all of the DNN references in the project were relative to the /bin folder.  The only change you would need to make in order to compile the module with DNN 8 assembly references is to change the .NET version in the project properties to .NET 4.5.1.

Regarding templates, the older DNN 7 templates still work for DNN 8.  I see no reason for you to use a DNN 8 template if you are sticking with the webforms module controls.  You can still use the "DNN7 DAL2 C#" template and, like I mentioned ealier, bump up the .NET from 4.0 to 4.5.1 so it compiles in a DNN 8 environment.  The new DNN 8 templates can be installed in addition to the DNN 7 templates because they only have the new type project structures for MVC and SPA as you know.

If you really want to move the module's codebase to one of the new DNN 8 types, decide which one is best for your module.   Check out a blog I did on this topic.  If most of your module's logic is in javascript/WebAPI, the easiest conversion is SPA.  You can pretty much rename the module control files from .ascx to .html (in your manifest too) .  Obviously you would also translate the server tags to the SPA tokens in the .ascx content too.

If you want to move to MVC, you need to change a lot more.  I think either way, I would branch my existing code and start a new project from scratch and migrate the code from the old project to the new one.  But leave the old one in tact for backward compatibility.

 
New Post
5/17/2016 10:33 AM
 
Hi Scott,

Thank you so much for your reply.

I don't mean anything too specific by upgrade, just what ever it takes to get it to work. I'm in the middle of that right now, so far I had to update a reference to system.web.http.dll and add a reference to system.web.webpages.dll as well as change the .net framework version as you mentioned.

I was assuming that there would need to be changes made to the DNN7 template to make it compatible with DNN 8, great that I can stick with what I have.

My module is mainly javascript/WebApi. But I still have quite a lot of c# code behind which i am gradually replacing with javascript. So SPA is probably the best way to go. 

Thank you once again.

All the best,

Steve
 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentModule Templates for Web FormsModule Templates for Web Forms



Try FREE
30 days money back guaranteed