.Net Core vs .Net Framework
.Net Core vs .Net Framework
Is .Net Core the next big thing in the web development world? In this blog we will discuss how does .Net Core differ from .Net Framework and will provide guidance to make the best use of each one of them.
.Net Core and .Net Framework share the same API which is called .Net Standard.
.Net Framework is used to create windows desktop application and server based application that run only on Windows and .Net Core is used to create only server applications that can run and build on Windows, Mac and Linux OS. C# and F# are used as programming languages in both runtimes.
When to use .Net core?
.Net Core is an open-source and cross platform framework and it is used to develop applications on any platform. It also can be used to refactor large enterprises into microservices. In addition .Net Core provides some inbuilt functionalities like Dependency injection and Logging.
Below are the scenarios for .Net Core:
- When you want to build cross-platform application
If a web application needs to run on multiple platforms like Windows, Linux and macOS then we should definitely go for .Net Core. .Net Core supports code of visual studio and third party editors such as Sublime, Emax and VI for cross platform development.
- When the need is to build high performance and scalable system
When the application needs to be performance oriented and scalable then it is better to prefer .Net Core over .Net Framework because .Net Core offers high performance server runtime for Windows and Linux server.
- When the need is side-by-side .Net version per application
When the application has dependency on a different version of .Net for installation then go for .Net Core. .Net Core provide side by side installation of multiple version for .Net core runtime on same machine.
- When Microservices and Docker containers are used
The application or service that uses microservice or Docker container should be developed on .Net Core because .Net Core provides facility to use microservices or services developed with Ruby, Java, .Net Framework. Usually containers work with microservice architecture, .Net Framework has limitations to work only with windows containers and image size is smaller with .Net Core while creating and deploying a container.
When not to use .Net core?
.Net Core does not support all .Net libraries and extensions so there are some conditions in which .Net Core is not a preferable option. Consider below scenarios:
- .Net Core does not support Windows forms and WPF applications.
- .Net Core is missing some .Net Framework feature like Entity framework core is not same as Entity framework.
- .Net Core does not give full support for VB.Net and F#.
- There are still some compatibility issues between .Net Core and .Net Framework.
When to use .Net Framework?
.Net Framework is used to build large-scale enterprise and desktop windows application using .Net workflow.
- When application need to use .Net Technologies which are not available in .Net Core
.Net Core does not support all .Net Framework technologies, there are still some technologies which are not available in .Net Core. Some of them are mentioned here:
- WPF and Windows forms.
- Asp.Net web page application.
- Asp.Net web form application.
- Asp.Net SignalR server.
- When application is using NuGet packages and third-party libraries that are not available in .Net Core
.Net Framework supports all NuGet packages and third-party libraries while .Net Core does not support all NuGet packages so If application is using NuGet packages and third-party libraries that are not available in .Net Core then .Net Framework is preferable.
When not to use .Net Framework?
There are some situations in which .Net Framework shouldn’t be used. Find them below:
- When applications need to run on multiple OS platforms.
- When high performance and scalability are needed.
- When open source framework is needed.
Conclusion of .Net Core vs .Net Framework:
In the above comparison of both technologies we can see a clear picture of .Net Core being a modern and updated framework to develop server-side applications.