When to use .NET Core and .NET Framework for your Business

When to use .NET Core and .NET Framework for your Business

Now that the industry is moving towards cloud services, it’s important to know which framework you need to work in for your software solutions. Is it cross-platform? Is it built using an older API? Do you care about backwards compatibility? There are two supported implementations for building server-side applications with .NET: .NET Framework and .NET Core. Both share many of the same components but there are also fundamental differences and your choice depends on what you want to accomplish.

In most circumstances, the better option is to use .NET Core - but not everyone has the luxury, and that’s where .NET Framework becomes a more viable option. Let’s take a deeper look at both cloud-based implementations and what they bring to the table when it comes to building applications.

Differentiating Between .NET Core and .NET Framework

.NET Core

.NET Core is an open-source, general-purpose development platform maintained by Microsoft and the .NET community. Designed to enable broad adaptability to new platforms and workloads, .NET Core can be freely adopted by individuals and companies, including personal, academic, or commercial use. Numerous companies use .NET Core as part of apps, tools, new platforms, and hosting services. The product is broken into several pieces, enabling the various parts to be adapted to new platforms at different times. 

.NET Core Characteristics

  • Cross-platform: Runs on Windows, macOS and Linux operating systems.
  • Consistent across architectures: Runs your code with the same behavior on multiple architectures, including x64, x86, and ARM.
  • Command-line tools: Includes easy-to-use command-line tools that can be used for local development and in continuous-integration scenarios.
  • Flexible deployment: Can be included in your app or installed side-by-side user- or machine-wide. Can be used with Docker containers.
  • Compatible: .NET Core is compatible with .NET Framework, Xamarin and Mono, via .NET Standard.
  • Open-source: The .NET Core platform is open-source, using MIT and Apache 2 licenses
.NET Framework

Also developed by Microsoft, .NET Framework is a virtual machine for compiling and executing programs written in different languages. It is used to develop form-based applications, web-based applications, and web services. Computer code written using .NET Framework is called managed code. Programs written for .NET Framework execute in a software environment named Common Language Runtime (CLR), which runs the code and provides services that make the development process easier.

The .NET Framework provides many services, including memory management, type and memory safety, security, networking, and application deployment. It provides easy-to-use data structures and APIs that abstract the lower-level Windows operating system using a variety of programming languages.

.NET Framework is a technology that supports building and running the next generation of apps and XML Web services. It was designed to:

  • Provide a consistent, object-oriented programming environment whether object code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.
  • Provide a code-execution environment that minimizes software deployment and versioning conflicts.
  • Provide a code-execution environment that promotes safe execution of code, including code created by an unknown or semi-trusted third party.
  • Provide a code-execution environment that eliminates the performance problems of scripted or interpreted environments.
  • Make the developer experience consistent across widely varying types of apps, such as Windows-based apps and Web-based apps.
  • Build all communication on industry standards to ensure that code based on the .NET Framework integrates with any other code.

Differences Between .NET Core and .NET Framework

When looking at .NET Core and .NET Framework, while they seem somewhat similar, there are in fact some major differences between the two cloud-based software solutions, such as:

  • App-models - .NET Core does not support all the .NET Framework app-models. In particular, it doesn't support ASP.NET Web Forms and ASP.NET MVC, but it supports ASP.NET Core MVC.
  • APIs - .NET Core contains a large subset of .NET Framework Base Class Library, with a different factoring (assembly names are different; members exposed on types differ in key cases). These differences require changes to port source to .NET Core in some cases .NET Core implements the .NET Standard API specification.
  • Subsystems - .NET Core implements a subset of the subsystems in the .NET Framework, with the goal of a simpler implementation and programming model. For example, Code Access Security (CAS) is not supported, while reflection is supported.
  • Platforms - The .NET Framework supports Windows and Windows Server while .NET Core also supports macOS and Linux.
  • Open Source - .NET Core is open source, while a read-only subset of the .NET Framework is open source.
  • .NET Core and Cross-Platform

    By far the biggest advantage .NET Core has over .NET Framework is its cross-platform capabilities – that means you can run it on multiple platforms and architectures. If your application (web/service) needs to run on multiple platforms (Windows, Linux, and macOS), use .NET Core. Or when your server application uses Docker containers, targets micro services in those containers, or you really need something that’s scalable, then .NET Core is the obvious choice.

    You can deploy .NET Core applications as framework-dependent applications and as self-contained applications.

    • Framework-dependent applications require the .NET Core framework to be installed on the machine that the app will run on
      • Self-contained applications don’t, because they contain everything the app needs to run
    • Framework-dependent applications can run on any operating system that you install .NET Core on, without modification
      • In contrast, for every OS that you want a self-contained app to run on, you need to publish an OS-specific version

    When your system needs the best possible performance and scalability, selecting .NET Core is the best option.

    .NET Framework and Compatibility

    One key advantage that .NET Framework has over .NET Core is an extensive list of supported libraries that are not on .NET Core. Many companies already have a solution in place to handle their enterprise applications, and that solution was very likely built on .NET Framework. As it stands, it is much more efficient to continue development in .NET Framework unless a complete overhaul is desired. Framework however works just fine, especially with features that aren’t going to be ported into Core such as ASP.NET Web form applications or Windows Presentation Foundation (WPF).

    When it comes to custom software development, cloud software solutions and enterprise software solutions, Code Authority has you covered. With a 100% in-house team of cloud developers and Amazon Web Services (AWS) certified architects, Code Authority will design, build, test, and deploy your cloud-based project from the ground up. We are a Microsoft partner with Gold Cloud Platform certification, meaning we are focused on using the advantages of the cloud to build your software efficiently. Contact us today to learn more about what we can offer your growing business in an ever-changing digital economy.