“ .NET is a developer platform made up of tools, programming languages, and libraries for building many different types of applications. ”
According to the Stack Overflow Developer Survey 2020, .NET and .NET Core (now known as .net 5) are among the top-3 software frameworks, libraries, and tools for professional developers (over 34,000 responses).
These statistics clearly demonstrate the popularity of .NET and .NET 5 among professionals that actively use them to build software products.
However, you may ask what is the difference between them and why not use a single technology, right?
That’s a great question and today our Product Architect Nikolay Sikorsky wants to share the story of why and how Ascendix migrated from .NET to .NET Core which allowed saving $428 per month and boosting the performance of our app by 200 times!
But before we explain in detail how to migrate from .NET to .NET core, let’s provide .NET Framework vs .NET Core comparison and define them.
What is .NET
First of all, you need to understand that there are three terms: .NET, .NET Framework, and .NET Core.
The key element is .NET – a developer platform. According to Microsoft, they provide the following .net definition:
.NET has multiple implementations that provide code execution for different platforms like iOS, macOS, Android, Windows, Linux, etc.
Here comes .NET Framework which is the original implementation that allows supporting running web/desktop applications and services on Windows.
It is a complex of valuable tools designed to accelerate development speed and APIs used by software developers to simplify integration with multiple services like the Windows Store.
Simply put, .NET Framework allows you to avoid manual code creation dedicated to support the Windows platform and use ready-made tools that greatly speed up the development process.
Outlook, StackOverflow, GoDaddy, Dell, and W3schools.com are among the leading web resources that were built using .NET.
We tried to clarify your understanding of the .NET developer platform and .NET Framework, but what about .NET Core?
In lay terms, .NET Core (now known as .NET 5) is a free and open-source cross-platform framework. From day one, it was mostly used to develop web and console applications.
It also allowed developing class libraries in .NET Standard which allowed sharing business logic between .NET Framework vs .NET Core applications.
NopCommerce, OrchardCore, SimplCommerce, and Blogifier are among the top .NET Core-Based application projects.
So, let’s now compare .NET Core vs .NET Framework to better understand the key differences, benefits, and drawbacks of each technology.
.Net vs .Net Core
Despite the different purposes of these technologies, let’s compare them by several aspects and discuss when to use .NET vs .NET 5.
.NET Framework is designed to build server-based and desktop applications for Windows, while .NET Core is a cross-platform runtime that allows to developer server-based and cloud apps that run on Windows, Linux, and macOS.
.NET Core is a cross-platform open-source run-time, while .NET Framework is not described by an open standard.
.NET Framework is much easier to master than .NET Core as it has a steep learning curve.
Now let’s discuss when ASP .NET vs ASP .NET Core are better to use.
|When Should You Use .NET vs .NET CORE|
|Have cross-platform needs||Use technologies that are yet unavailable within .NET Core|
|Want to get command line interface (CLI) control||Use NuGet packages or third-party tools unavailable in .NET Core|
|Try to meet scalable and high-performance system needs||Have a platform that doesn’t support .NET Core.|
|Have Docker containers being used|
|Run many .NET versions side-by-side.|
We hope this will help better realize when .NET Core vs Framework is a great choice for your application development.
.NET 5: Reasons & Benefits
By releasing a new version of .NET Core, Microsoft wanted to enter the open-source community, get support on developing a new framework, and present know-how that will compete with ever-growing Nodejs.
The community feedback was extremely positive as the framework is free and open-source which means that any startup company could start using it for commercial purposes.
One of the key benefits of using .NET Core is its cross-platform nature which makes it possible to be hosted on Linux servers that are much cheaper than Windows ones.
What’s more, they support Docker which allows to quickly build and package apps as Docker images.
Why Microsoft still supports .NET Framework?
Microsoft could not stop supporting the .NET framework since a lot of existing enterprise projects are based on it.
As .NET framework development includes heavy licensing costs for diverse supporting tools, one of the missions of .NET Core is to fully support .NET Framework.
- First, in case you have an existing business in .NET Framework, don’t worry about its future support as .NET Core (version 5) fully takes care of it.
- Second, if you are wondering what technology to choose for new product development and launch, we recommend considering .NET Core (version 5) as it provides must-have support for many modern tools.
Now let’s dive into the story of how and why we decided to migrate from .NET 4.5 to .NET Core 2 in greater detail.
To start with, the first need to migrate from .NET to .NET Core emerged while we have been supporting a complex KnockoutJS-based web application with a server on .NET 4.5.
“ Our task was to rework and restructure lots of aspects to follow the latest technologies and server-side became our first stage towards migration. ”
What were the key objectives of migration from .NET to .NET Core?
- We decided to separate the server-side and front-end logic to get rid of old code parts and low codebase quality. The key goal was to boost the development time and accelerate the page loading speed.
- We analyzed .NET Core and noticed that lots of tools and opportunities we required were already available in .NET Core out-of-the-box.This way, we intended to migrate from .NET to .NET Core and avoid updating third-party libraries that would have greatly saved much time in the long run.
- Migrating to .NET Core would have allowed us to run on Linux and leverage multiple benefits from using Docker and Kubernetes.
- .NET Core would have allowed us to start using Visual Studio Code for development.
- We wanted to make our developers even happier! It is easier to keep the team motivated if you use modern technologies and constantly improve on development processes. Also, it is much simpler to find new developers if you operate new and “hot” technologies.
We believe these goals clearly demonstrate the reasons and objectives to migrate from .NET vs .NET Core based on our experience.
Let’s now discuss the migration process in detail.
Despite the high dominance of React/Angular/Vue.js in the market, our application still used KnockoutJS and jQuery.
However, bundles are still static resources which means that we couldn’t use hot reload yet, but, nevertheless, we could start taking care of the server.
Considering the server-side optimization and migration, we started using out-of-the-box Dependency Injection which provides more convenience and is easy to integrate.
It required lots of improvements and rework of the existing codebase that may seem time- and cost-consuming.
“ However, it was also a perfect opportunity to perform a code audit and decide whether we need some functionality. ”
Following this optimization approach, we transferred most code aspects from our memory and filesystem to the caching service (Couchbase/Razor).
Besides, we removed several useless code blocks with unverified logic related to threading and then transformed the application into a stateless one which allowed us to scale out.
Once we have completed the health-check and monitoring procedures, we started using Azure Kubernetes Service for deployment orchestration.
Considering the key roadblocks during the migration process, we had a single challenge and an unconventional solution.
So, we faced the problem of lacking several libraries supported by .NET Core and decided to find and use alternatives. However, we found that there were no analogs to XML which forced us to act radically and remove the XML-related functionality.
We transferred it into a separate application that was a perfect fit for us since we could perform needed operations at build stage and not at runtime.
This solution helped us reduce the server-side logic drastically and became the last stage towards making our application stateless.
We told you our story of how to migrate from .NET to .NET Core in terms of our project case, but what were the final outcomes?
So, we boosted the application’s performance by 200 times compared to the old server and reduced environmental costs.
“ Totally, our migration from .NET to .NET Core has allowed us to save up to $428 per month. ”
As a next step, we can switch to F2 nodes on Prod, which could save us another $336/mo.
.NET 5 helped us audit and refactor the old codebase and server logic which greatly helped improve the application’s KPIs.
Besides, .NET 5 forced us multiple times to review approaches and optimize them technically.
Currently, we are using .NET Core for all new .NET-related projects due to the benefits it provides. In case we need some specific logic and .NET Framework is a must-have option, then we create a separate microservice for that logic only.
Looking for .NET Developers?
We’re at your service with 10-year expertise. Just fill in the form and get developers on demand.
We hope our story of how to migrate from .NET to .NET Core will be helpful and applicable within your projects.
Analyze your tech stack and always try to use the latest and modern technologies to keep optimizing costs and make your applications highly performant.
This use case allowed us to get cost reduction by $428 per month which is still scalable by switching to F2 nodes on Prod, which could save us another $336 and boosted our app performance by multiple times.
Daniil specializes in content marketing and has a deep knowledge of promoting the company's products and services through high-quality content. On the Ascendix blog, Daniil shares his tricks and tips on custom software development, provides technology trends and insights, and helps you get valuable content to make your business even more successful and profitable.
Leave a comment
Subscribe to Ascendix Newsletter
Get our fresh posts and news about Ascendix Tech right to your inbox.