News

Microsoft: Move from Traditional ASP.NET to 'Core' Requires 'Heavy Lifting'

There are plenty of reasons to move traditional ASP.NET web apps -- part of the old .NET Framework -- to the new cross-platform direction, ASP.NET Core, but beware it will require some "heavy lifting," Microsoft says.

"The process of migrating from ASP.NET to ASP.NET Core is doable but not without some heavy lifting and understanding the complexities of the differences in the new programming model," said Mike Finley, app dev manager, in a Jan. 20 blog post. "I do believe the change is worth the time if you are looking at moving to the cloud and want to use Azure WebApps, containers or LINUX OS as your host."

More precisely, in fleshing out the cloud/container/Linux considerations, Finley listed these reasons developers may want to move:

  • Cross-platform needs
  • Targeting microservices
  • Using Docker containers
  • Require high-performance and scalable systems
  • Require side-by-side .NET versions per application

Finley's post was meant to help developers understand the aforementioned programming model complexities involved, and he focused on three migration steps for upgrading web applications using MVC and Entity Framework:

  • Model/Data Layer: Entity Framework to EF Core Migration Strategy
  • Controller/Business Layer: .NET to .NET Core Migration Strategy
  • View/UI: ASP.NET to ASP.NET Core Migration Strategy

Regarding that first item, Microsoft developers have had some trouble in moving Entity Framework functionality to the new Core platform, especially with LINQ, and Finley warned developers to be aware of missing functionality.

"Make sure that EF Core has all the features you need to use in your application," he said, pointing to a feature comparison table. "If any required features are missing, ensure that you can compensate for the lack of these features before porting to EF Core."

That EF Core/EF 6 feature comparison page does show many features missing from EF Core -- touching upon model creation, querying data, saving data and so on, but also shows many EF Core features not found in EF 6, such as support for Jet (Microsoft Access), Cosmos DB and in-memory testing functionality.

Moving beyond the data layer, Finley pointed out that with the view/UI layer, the ASP.NET to ASP.NET Core Migration Strategy "is more of a port than migration." Among many changes in ASP.NET Core, Findley included this: "ASP.NET Core projects offer developers the flexibility of targeting .NET Core, .NET Framework, or both however targeting .NET Core allows you to eliminate numerous explicit package references thanks to the ASP.NET Core metapackage feature."

On the server side of things where the controller/business layer resides, Finley summarized the migration considerations that are dependent upon what a developer wishes to accomplish:

  • Use .NET Core for your server application when:
    • You have cross-platform needs.
    • You are targeting microservices.
    • You are using Docker containers.
    • You need high-performance and scalable systems.
    • You need side-by-side .NET versions per application.
  • Use .NET Framework for your server application when:
    • Your app currently uses .NET Framework (recommendation is to extend instead of migrating).
    • Your app uses third-party .NET libraries or NuGet packages not available for .NET Core.
    • Your app uses .NET technologies that aren't available for .NET Core.
    • Your app uses a platform that doesn't support .NET Core. Windows, macOS, and Linux support .NET Core.

In addition to the aforementioned EF Core/EF 6 comparison table, Finley pointed to additional guidance and documentation including:

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

  • Vendors Update Controls for .NET Core 3.1, Blazor

    This week saw two third-party vendors of dev tools -- UX and UI toolkits and controls -- release new offerings that include support for two of Microsoft's main open source frameworks, the cross-platform .NET Core 3.1 and Blazor, which allows for creating browser-based web applications with C# instead of JavaScript.

  • C++ Is Focus of New Visual Studio 2019 v16.7 Preview 2

    C++ development is a focus point of the new Visual Studio 2019 v16.7 Preview 2, featuring a slew of tweaks and improvements touching upon remote SSH connections, IntelliSense support and more.

  • Clustering Non-Numeric Data Using C#

    Clustering non-numeric -- or categorial -- data is surprisingly difficult, but it's explained here by resident data scientist Dr. James McCaffrey of Microsoft Research, who provides all the code you need for a complete system using an algorithm based on a metric called category utility (CU), a measure how much information you gain by clustering.

  • So What's Up with Microsoft's (and Everyone Else's) Love of Rust?

    Microsoft already stewards several popular programming languages -- C#, TypeScript, F# -- so what's up with its love of Rust, along with the rest of the world?

  • C# Steps Up Programming Language Popularity Ladder

    Microsoft's C# programming language climbed a year-over-year notch on the TIOBE Index, which measures popularity among developers.

.NET Insight

Sign up for our newsletter.

Terms and Privacy Policy consent

I agree to this site's Privacy Policy.

Upcoming Events