Microsoft’s .NET is free, open-source developer platform for building server applications. The platform is entrusted for building web, mobile, desktop, gaming, and IoT applications using multiple languages (C#, F#, or Visual Basic), libraries, and editors.
The .NET open-source community is huge. Over 25,000 developers from more than 1700 companies outside Microsoft contribute to the community. Moreover, some of the widely popular and significant tech groups such as TSG, Google, Unity, Red Hat etc. steer the future of .NET platform.
For building server-side applications, .NET have two supported implementations: .NET Framework and .NET Core. Both of them share similar components and allow developers to share code across themselves, however they have some fundamental differences.
The choice between .NET Core vs .NET Framework however depends upon the type of application to be built and the platform on which it is to be built. Here is a detailed comparison between the two; for building scalable server-side application.
.NET Framework: Overview
The .NET Framework is a development platform to build apps for web, Windows Server, Windows Phone, and Microsoft Azure. The framework includes libraries for specific areas of application development, such as ASP.NET for web apps, ADO.NET for data access, Windows Communication Foundation for service-oriented apps, and Windows Presentation Foundation for Windows desktop apps.
Core Characteristics of .NET Framework includes:
- The language compilers of .NET Framework ensures that programs written in one language can be compiled and be accessed in other languages
- A newer version of the framework can support apps developed in previous versions, without much code modification
Core Components of .NET Framework includes:
- A run-time environment called Common Language Runtime (CLR). It is the virtual machine component of .NET framework, responsible for managing the execution of .NET programs.
- The .NET Framework class-library, which is a reusable set of classes, data types, and interfaces.
.NET Core: Overview
.NET Core is a .NET foundation project that uses MIT and Apache 2 licenses. It is a general-purpose, cross-platform development platform for building applications for Windows, Linux, and macOS. It uses Universal Windows Platform (UWP) for creating Windows apps and ASP.NET for web apps.
Core Characteristics of .NET Framework includes:
- Can be included in existing app or Docker containers
- Have command-line tools for local deployment and continuous integration
- Runs the code with same behaviour on multiple architectures (x64, x86, and ARM)
- C#, Visual Basic, and F# languages can be used to write applications and libraries for .NET Core.
Core Components of .NET Core Framework includes:
- A runtime, which includes basic services such as type system, assembly loading, a garbage collector
- A set of framework libraries, SDK tools and compilers, and application host for launching apps
.NET Core VS .NET Framework: Comparison
Use .NET Core when:
- You want to build cross-platform applications
If the new application (web or service) needs to run on multiple platforms- Windows, Linux, macOS, choose .NET Core over .NET Framework. Visual Studio Code and third party editors such as Sublime, Emacs, VI support .NET Core for cross platform development.
- The need is to build high-performance and scalable systems
When a performance-oriented and scalable system is on the list, it is better to prefer .NET Core over .NET Framework. Reason being, .NET Core offers high-performance server runtime for Linux and Windows Server.
- When you are using microservices or Docker containers
For applications or services that use microservices or Docker containers, opting .NET Core makes more sense. Reasons include:
1) .NET Core facilitates mixing microservices or services developed with Ruby, Java, .NET Framework, or other monolithic technologies.
2) Containers usually work in conjugation with microservices architecture. With .NET Framework, there is limitation to work with Windows containers only. Moreover, while creating and deploying a container, the image size is smaller with .NET Core vs .NET Framework.
- You need side-by-side .NET versions per application
For applications that may have dependency on different versions of .NET for installation, opt for .NET Core. .NET Core offers side by side installation of multiple versions for .NET Core runtime on the same machine.
Use .NET Framework when:
- The app is using .NET technologies that are not available for .NET Core.
A number of .NET technologies are not available for .NET Core. For example: ASP.NET web pages applications or workflow related services (WCF Data Services, Windows Workflow Foundation) are not included in .NETCore.
- The existing app uses a platform that .NET Core does not support.
Some of the Microsoft or third party services/platforms do not offer support to .NET Core. For example: Azure’s Service Fabric Stateful Reliable Services programming model does not support .NET Core and is available for.NET Framework.
.NET Core VS .NET Framework: Conclusion
The above overview and comparison of both technologies give a clear picture of .NET Core being a modern and updated framework for building server-side applications.
In case you are looking for a technology partner to migrate your applications from .NET Framework to .NET Core, or build new applications using .NET Core framework, get in touch with our Microsoft technology experts through our no-obligation 30 minute consultation program.