How to migrate out of ASP NET Webforms?
Eduardo Fonseca
Founder | Entrepreneur | Blazor Developer | Software Architect | .NET & Azure Expert | Cloud Architect | Creator of FairPlayTube | Software Engineer | Author | Digital Content Creator | Game Developer | Tech Innovator
In a previous article we discussed how companies are losing thousands of dollars by been relcutant to migrate out of ASP .NET Webforms, today, we are going to discuss a little bit how to do so.
I have worked in multiple big migration projects, and I am frequently designing my own projects and updating them to the latest versions and frameworks, so I have very good experience on some of the processes.
Note: You can help funding my Open Source projects by becoming a Github Sponsor here https://github.com/sponsors/efonsecab
There are at least two approaches:
Someone a couple of years ago mentioned to me that they do a partial migration using the power of conditional compilation, which is actually a good idea if you know how to use it and have a good design of the migration steps prior to doing so.
Migrating your project in the same solution usually means for some time, hours, days, even weeks, the code may not compile and a lot of code should be commented while the functionality is converted. The downside of this form of migration is that you would usually try to keep everything the same, meaning there is a lot of bad code you wont fix.
领英推荐
Migrating your project to a new solution, is better since usually the initial solution is clean, and you can start cleaning up your original code as you move it. One of the downsides is that this form of migration may be slower. Some would call this form of migration a re-write instead, they are in part correct.
For doing the first form of migration there are currently some tools that help you speed up a little bit the process, one tool is named CoreForms, it's basically a tool to migrate your WebForms systems to .NET Core. This tool basically tries to allow you to keep using your current WebForms implementation, on .NET Core, of course, it has is limitations.
Another tool which allows you to migrate out of Webforms is the AWS Porting Assitant for .NET, and one of the great news, it converts your Webforms code into Blazor!
No matter the form of migration that you use, there would be lots of manual process involved, remember that ASP .NET Webforms is extremely old and has been recommended for years to stop been used in pro of the newer approaches like ASP .NET MVC, Razor Pages, and nowadays Blazor.
How many projects have you migrated out of ASP .NET Webforms?