Updated July 5, 2023
Introduction to What is .NET Core
The following article What is .Net Core provides an outline for the architecture of the .Net core in detail. .Net Core is an open-source Development Platform designed and maintained by Microsoft and the .Net community. .Net Core has been designed keeping in mind various needs and purposes, focusing on Web Development, Windows Phone Development, and Windows Store Apps Development. .Net Core is a subset of the .Net Framework.
In more accurate terms, a forked-out version of the .Net Framework. Now you may be wondering what the need was to come up with .Net Core when it is just a subset of the .Net Framework. .Net core has some fundamental changes to the way it operates. First and foremost, it is more modularized. This helps you create applications with only the libraries you need and no extra baggage. Second, it is truly cross-platform. This makes it the choice of development platform of the future.
.NET Core Architecture
With any development platform or framework, the basic and the most important thing is its architecture. The architecture defines the way developers and libraries will interact with the platform. Before we learn more about .Net Core, it is important to see what is at the core of the .Net Core.
This is where .Net Core sits in the .Net Stack. The various .Net Frameworks and libraries, till date, use the common runtime libraries, compilers, and NuGet Packages. They build their own platform-specific libraries on top of these common packages. The Common libraries contain the definitions for primitive stuff such as data types. This hardly changes and is thus the base for all .Net stack frameworks.
Key Terminologies in the Architecture of .NET Core
The key terminology in architecture of .net core is as follows:
Let us see the key terminologies in the architecture of the .Net Core.
- Core CLR: Core CLR is the Common Language Runtime optimized for multiplatform and cloud-based deployments. This, along with .Net Native Runtime, forms the foundation of all .Net based platforms.
- .Net Native Runtime: Also referred to as Managed Runtime, .Net Native Runtime contains the native windows based libraries. This also contains Ahead Of Time (AOT) compilation instead of the erstwhile Just In Time (JIT) compilation. This improves the performance of the applications. The .Net Native Runtime and the Core CLR are the layers that contain implementations of primitive types as well as generic collections in .Net. These layers hardly change and are constant throughout the various .Net stacks. The various .Net stack APIs, thus, share the same implementations.
- Unified BCL: The Unified Base Class Library, also referred to as CoreFX, consists of the basic and fundamental classed that form the core of the .Net Core platform.
- App Models: On top of the BCL, sit the various App Models that developers leverage to develop platform-specific applications. Currently, .Net Core has the ASP .Net Model for web development and Windows Store Model for windows application development.
Power of NuGet
- .NET Core platform, in stark contrast to its predecessor .Net Framework, is delivered as a set of NuGet packages. Thus, .Net Core essentially contributes to the already thriving ecosystem of NuGet packages. Notice that .Net Core doesn’t come as a single NuGet package. Instead, it has been factored, modularized and shipped as several NuGet packages.
- Moreover, Microsoft eliminated the confusion around the nomenclature of NuGet packages and the relevant assemblies. In .Net Core, the NuGet packages have the same name as the assembly. For example, immutable collections now ship under the name of the System.Collections.Immutable instead of Microsoft.BCL.Immutable. This has greatly simplified the problem of determining which NuGet package contains which assembly. Hey, they are named the same now.
So, why did Microsoft decide to ship .Net Core as a set of NuGet packages?
Well, here are the reasons:
- NuGet allows delivering .Net Core in an agile fashion. Any upgrade to any .Net Core feature can simply be consumed by upgrading the NuGet package.
- This has generalized the dependencies in your applications. Now there are no assembly references, libraries, and third-party NuGet references. They are all NuGet now. So, if any third-party NuGet package required a higher version of the System.Collections library, it will prompt you to upgrade the corresponding System. Collections NuGet package and you are done. It really becomes very simple.
- The modular approach of .Net Core ensures that each application deploys only the packages that they need. No extra baggage.
How .NET Core Makes Working Easy?
.Net Core is a platform on top of which there are frameworks such as ASP .Net Core and Universal Windows Platform that leverage and extend the features of .Net Core.
Let us look at the features of .Net Core that make life easy for developers.
- Cross-Platform and Architecture: .Net Core follows the principle of build-once-run-anywhere. Thus, it is cross-platform. It supports Windows, MacOS and Linux platforms. You can build your application on any platform and run on another. Also, an application built in .Net Core is consistent in its behavior across any architecture such as x64, x86 or ARM.
- Command Line Tools: .Net Core comes with easy to use command-line tools for those who like to code black and white. These tools are handy for local development as well as for continuous integration of code in repositories.
- Flexible CI/CD: .Net Core supports Continuous Integration and Continuous Deployment. Thus, you only need to worry about code logic. Rest is all handled by the .Net Core platform.
- Languages and IDEs: .Net Core applications and libraries and can be coded in C#, F#, and Visual Basic. This is further supported by integration with your favorite IDEs such as Visual Studio, VS Code, Sublime, Vim, etc.
- Compatibility and Support: Compatible with .Net Framework, .Net Standard, Mono APIs, and Xamarin. Being open-source, it has great support from the community as well as from Microsoft.
- APIs: .Net Core exposes APIs for many general-purpose as well as high-performance scenarios. On one hand, there are APIs for primitive data types (bool, int, etc.) and Collections (Lists, Dictionaries etc). On the other hand, there are APIs for high-performance types such as Vector and Pipelines.
.Net Core is an application development platform. There are frameworks built upon .Net Core that the developers can leverage to build applications on top of them. To learn development in .Net Core, you require some basic understanding of ASP .Net development, the MVC architecture, and how do NuGet packages and assembly references work in ASP .Net. This will greatly simplify your learning curve. Also, knowledge of C# is a must to develop an application in .Net Core.
For those who are already developers in .Net Framework and want to migrate their applications to .Net Core, it is advised to keep in mind the following points:
- .Net Core does support ASP .Net MVC architecture. However, if your application is Web Forms-based, .Net Core does not support WebForms.
- If your application is built upon ASP .Net MVC architecture, then the sole gain to move it to .Net Core platform is the cross-compatibility. If cross-compatibility isn’t much of a game-changer for your application, ASP .Net MVC is just as good.
- .Net Core focuses mainly on Web and Windows Store development. Thus, currently, there is no support for Desktop applications.
- Console apps are the most benefited from .Net Core migration. This would make them operable on multiple Operating Systems.
- Web Applications built-in Silverlight would need migration to HTML before considering .Net Core. Silverlight support has been discontinued by Microsoft.
How .Net Core helps in Career Growth
.Net Core is truly cross-platform. This is Microsoft’s future platform for integrated development environments for the devices of the future. .Net Core focuses on Web, Windows Store, and touch-based devices.
Learning .Net Core will greatly help you in making applications that cater to the future needs of devices and platforms. The design principles of .Net Core ensure that you follow the best practices of development. There is a rapidly growing need for a more robust and interactive application experience, be it web-based or mobile-based. This, in turn, drives the need for an improved, simpler, and developer-friendly platform. Gone are those days when an application developed in one platform would not work on another platform. Today’s demand is to develop applications that are built once and run everywhere. .Net Core is built upon this ideology and learning it would help you create better applications for modern devices.
Conclusion – What is .NET Core
The .NET Core platform is not like its predecessor .Net Framework. It is a new .NET stack that is optimized for open-source development and agile delivery through NuGet. While the .NET Framework was designed to be cross-platform, it was largely a Windows-only platform. .NET Core is truly cross-platform. Microsoft is looking to be future-ready and .Net Core is a very fruitful step towards that. It is recommended for interested readers to deep dive more into .Net Core by reading Microsoft Developers blogs. For those who are keen to start building apps in .Net Core, the best way is to start with a shell project in .Net Core in Visual Studio.
This is a guide to What is .NET Core. Here we discuss .NET Core architecture, working, required skills along with career growth. You can also go through our other suggested articles –