Journey from .Net framework to .Net Core

The first version of ASP.NET 1.0 came out almost 14 years ago and today we have another flavor of .net called as .Net core. The concept of .Net core was comes while Microsoft started receiving requests from some ASP.NET customers for “.NET on Linux”. Around the same time,Microsoft design a smaller product called as Window Nano. As a result, Microsoft started a new .NET project, which we code named “Project K”, to target these new platforms. They changed the name and shape and experience of the product and now finally we have that product in the named of .Net core; which preview version available form November 2014 and finally the released version of .net core 1.0 introduced on 27 June 2016.

The best thing of .Net core is that it can run independent of any Operating system. Which allows developer to build broad range of .Net application. Now the .Net core is Open source which available now on “GitHub”.

Note :- .NET Core is part of ASP.NET Core and is a subset of the .NET Framework. You can learn more about .NET Core and how and where you can use it in the CoreCLR is open source blog post.

Now what the .Net core meant for ?

.NET Core is a new cross-platform for .NET product.

  • Cross-platform: Runs on Windows, macOS and Linux.
  • Flexible deployment: Can be included in your app or installed side-by-side user- or machine-wide.
  • Command-line tools: All product scenarios can be exercised at the command-line.
  • Compatible: .NET Core is compatible with .NET Framework, Xamarin and Mono, via the .NET Standard Library.
  • Open source: The .NET Core platform is open source, using MIT and Apache 2 licenses. Documentation is licensed under CC-BY. .NET Core is a .NET Foundation project.
  • Supported by Microsoft: .NET Core is supported by Microsoft, per .NET Core Support.

Composition of .Net core :-

.Net core is composed of following things :-

  • A .Net runtime environment
  • A set of Framework library.
  • A set of SDK tools and language Compiler.
  • The ‘dotnet’ apphost.

Distribution of .Net core :-

There are two main distribution of .net core called as:-

  • .Net core :- Includes the .net core runtime and framework. The current version is “.Net core 1.0”
  • .NET Core SDK – Includes .NET Core and the .NET Core Tools. The current version is “.NET Core SDK 1.0 Preview 2”.

How .Net core relates to .Net framwork ?

When .Net framework released it designed such a maner that it only share common API and run on windows operating system. The .NET Platform isn’t a single entity but a set of platforms.

Above picture show that .Net framwork worked over single vrtical by sharing common API on differernt platform.Hence there is no problem with single vertical but the problem arrise while it comes on horizontal i.e multiple verticals.

Birth of portable class library :-

Originally, there was no concept of code sharing across verticals. No portable class libraries, no shared projects. You were essentially stuck with creating multiple projects, linked files, and #if. This made targeting multiple verticals a daunting task.

Originally, the .NET Framework was designed around the assumption that it’s always deployed as a single unit, so factoring was not a concern. The very core assembly that everything else depends on is mscorlib. The mscorlib provided by the .NET Framework contains many features that that can’t be supported everywhere (for example, remoting and AppDomains). This forces each vertical to subset even the very core of the platform. This made it very complicated to tool a class library experience that lets you target multiple verticals.

Then the  idea of contracts comes in to the picture, contracts is to provide a well factored API surface area. Contracts are simply assemblies that you compile against. In contrast to regular assemblies contract assemblies are designed around proper factoring. It deeply care about the dependencies between contracts and that they only have a single responsibility instead of being a grab bag of APIs. Contracts version independently and follow proper versioning rules, such as adding APIs results in a newer version of the assembly.

Ccontracts using to model API sets across all verticals. The verticals can then simply pick and choose which contracts they want to support. The important aspect is that verticals must support a contract either wholesale or not at all. In other words, they can’t subset the contents of a contract.

This allows reasoning about the API differences between verticals at the assembly level, as opposed to the individual API level that .net had before. This aspect enabled to provide a class library experience that can target multiple verticals, also known as portable class libraries.

All these aspects caused us to rethink and change the approach of modelling the .NET platform moving forward. This resulted in the creation of .NET Core:

Finally Enter in to .Net Core :-
.NET Core is a modular implementation that can be used in a wide variety of verticals, scaling from the data center to touch based devices, is available as open source, and is supported by Microsoft on Windows, Linux and Mac OSX.

.NET Core is essentially a fork of the NET Framework whose implementation is also optimized around factoring concerns. Even though the scenarios of .NET Native (touch based devices) and ASP.NET 5 (server side web development) are quite different, we were able to provide a unified Base Class Library (BCL).

You can find more about this:-

References :-

for Road Map .net core :-

Visual studio Update3 for .net core :-

Hope this blog value for your time.

“Share your experience about My blog”




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s