Historically, .NET Core was merely one framework among the .NET family (.NET Framework, .NET Core, and Xamarin). However, with the release of its '5th version', Microsoft declared .NET Core as the primary 'implementation of .NET “development platform'. This suggests that companies evaluating their future should seriously consider .NET Core.
When debating whether to migrate your server application from .NET Framework, it's natural to compare it with .NET Core.
There’re Several factors drive this comparison:
- Cross-platform requirements
- Microservices requirements
- The need to use Docker containers
The .NET Framework only supports Windows. If you want your application to serve more than just Windows users without maintaining separate code for different operating systems, .NET Core is your solution.
It allows your code to run on not just Windows, but macOS, Linux, and Android as well.
A significant part of .NET Core is the ASP.NET Core web development framework. It's designed for building high-performance, cross-platform web apps, microservices, Internet of Things apps, and mobile backends. By utilizing ASP.NET Core, you can operate with fewer servers or virtual machines, resulting in infrastructure and hosting cost savings. Moreover, ASP.NET Core is faster than many other popular web frameworks.
With a 'monolithic app', you might need to halt the entire application to address critical bugs - a common and significant disadvantage.
Breaking these sections into microservices allows for more targeted iterations.
Microservices designs can also reduce your cloud costs, as each microservice can be independently scaled once deployed into the cloud.
Microsoft recommends using .NET Core for microservices-oriented system. Although .NET Framework can be used to develop microservices, it tends to be heavier and lacks cross-platform compatibility.
Docker container requirements
Development and deployment can be like night and day. Software may work perfectly on a developer’s machine but fail when deployed to a hosting environment accessible to clients. Docker containers are often used to mitigate this issue.
While Docker containers can simplify the deployment of your application onto a production web server, even with .NET Framework, Microsoft recommends their use with .NET Core, particularly for microservices architectures.
Microsoft provides a list of pre-made Docker containers specifically for .NET.
Migrating from .NET Framework to .NET Core
Porting to .NET Core from .NET Framework is relatively straightforward for many projects. The central concern is the speed of the migration process and what considerations are necessary for a smooth transition.
However, certain issues can extend the timeline and increase costs:
- Shifting from ASP.NET to ASP.NET Core requires more effort due to the need to rewrite app models that are in a legacy state.
- Some APIs and dependencies might not work with .NET Core if they depend on Windows-specific technology. In these cases, it's necessary to find alternative platform-specific versions or adjust your code to be universally applicable. If not, your entire application might not function.
- Certain technologies aren't compatible with .NET Core, such as application domains, remoting, and code access security. If your code relies on these, you'll need to invest time in exploring alternative strategies.
Our Successful Migration to .NET Core: A Case Study
Our client, a U.S. based Healthcare Technology company, delivers a customized EHR solution to healthcare organizations globally.
Historically, they relied on the .NET Framework, which restricted their service to Windows users only. Their software was incompatible with macOS, thus motivating them to migrate to .NET Core.
Our migration process unfolded as follows:
- Building a .NET development team. We presented the client with three potential developers, allowing them to select the best fit.
- Preparing for migration. We scrutinized the dependencies in .NET Framework that were crucial for transferring to .NET Core. This step was essential to prevent future issues such as inaccessibility of certain files and incompatibility with third-party apps, libraries, and tools. We compiled a list of technologies, libraries, and files unsupported by .NET Core that required upgrading.
- Upgrading dependencies.
- Refactoring. This included optimizing the database and modernizing APIs.
- Migrating the front end from AngularJS to Angular 2+.
Our .NET development team successfully transitioned the backend of the EHR software to .NET Core and the front end to Angular 2+. This has now empowered our client to expand their customer base to include macOS users. For more detailed insights, please refer to the this case.
Anticipated Outcomes after Migration to .NET Core
Thomas Ardal, the founder and developer behind elmah.io (a service that provides error logging and uptime monitoring for .NET software), shares his experience following the migration of over 25 projects to .NET Core:
“Migrating has been an overall great decision for us. We see a lot of advantages already. Simpler framework. Faster build times. Razor compilation way faster. … Better throughput on Azure and less resource consumption (primarily memory). The possibility to move hosting to Linux. And much more”.
Rate this article