What is .Net Core Framework?
In this article, you’ll understand the basics of introduction to the ASP.NET Core Framework and .NET Core is a runtime. The main design aim of the .NET Core is to support developing cross-platform .NET applications. It is Portable to support Windows, Mac OS & Linux. the .NET Core Framework is an Open Source maintained by Microsoft and the .NET Framework community on GitHub. Now with ASP .NET Core is ways to build a web application and it is a subset of Full .NET Framework. So, the Windows Forms, WebForms, WPF applications are not part of the .NET Core. But, the .NET Core 3.0 framework brings support for Windows Desktop apps built with WPF and Windows Forms.
So, the ASP.NET Core is an open-source, cross-platform, light-weight, and cloud-based Web Application for building modern web applications. It can be run on both .NET Core or full .NET Framework. ASP.NET Core is part of the .Net framework and not the next version of the ASP.NET.
What is .NET Standard?
The .NET Standard is used to create a class library that can share code between .NET Core and .NET framework.
So, what it is and why you should care about it first let’s understand the current state of the .NET Ecosystem. So, over the years, we have shipped our net for a variety of different operating systems form factors and user experiences and that’s a good thing. Because it doesn’t matter whether you’re a mobile developer or a cloud developer or desktop developer and doesn’t even matter anymore. whether you target Windows or not Microsoft provided platforms such as Linux, iOS, or MAC.
History of ASP.NET
The .NET Core introduces the biggest shift the platform has experienced so far but let’s take a look at how it has evolved over time.
In 1996 Microsoft released a framework called ASP which stands for active server web pages or classic ASP.
So, with classic ASP Microsoft made it possible to have server-side scripting to dynamic web pages. The biggest revolution came when Microsoft released a .Net framework.
2] ASP.Net web forms
Microsoft introduced the ASP .Net framework web forms in 2002. This made the creation of web pages like the creation of the Windows forum.
A few are downsides with web forms. but, the form tried to make stateless Web state full and to do that it had to make a lot of changes, to make sure web pages keep their status or their values automatically. View states contained those values and that resulted in a lot of data being generated and transferred with each request.
Sometimes even if it was not required what forms was the first version to introduce code behind is good. But, it makes testing difficult. because in one line we are reading from the database and in the next. we are updating the UI another common issue was page lifecycle when requesting a page number of events were getting fired.
Getting to know all these events was quite difficult and it was very easy to get anything wrong. Although there were a few downsides of web forms they were successful to get the site up and running quickly.
3] ASP .Net MVC
A couple of years later in 2009 Microsoft officially released the first version of ASP .Net MVC and they tried to overcome most of the problems with those forms.
It had an emphasis on separation of concern MVC code is much easier to write unit tests for MVC and it was the first edition they released as open source. Now, a lot of developers did not like the MVC framework because it also had its flaws when it was created. It was built on top of components already created for web forms because of which it was tied to the system.
.NET Web which was tied to IIS and eventually windows. But, the web is evolving quickly and hence Microsoft had to keep MVC with everything that was changing also. MVC was built before the cloud came into the picture even though a lot of MVC applications are running on the cloud.
But, it was not built with the cloud in mind then finally in June of 2016 Microsoft released a new version of .NET which is ASP .Net core.
4] ASP .Net Core
Now, ASP .Net core is built on top of the new .Net core framework. The .Net core. is the first cross-platform version of .NET and hence it is not tied to Windows ASP. the .NET core as compared to the old ASP .Net MVC is not tied to the .Net framework assemblies like system.web.Asp.Net
The ASP .Net core 2.2 was released in December of 2018.
ASP.NET Core benefits and features:
1. ASP .Net core is fully open-source and cross-platform.
2. First ASP .Net MVC had a dependency on IIS but ASP .Net core has no longer that requirement of IIS. there is also unification between MVC and web API.
3. Earlier they were different because ASP .NET MVC had a dependency on the system.web but now since that dependency is gone there is no reason to keep MVC and web API separate data since they have the same syntax and everything else.
4. Dependency injection is the ability to plug dependencies in our code. now a core feature of the platform although the previous version had support for dependency injection. but, the Asp.Net core has been built with dependency injection.
5. In ASP .NET core has a modular-like pipeline we will take a look at the middleware. that we will use in the pipeline in the upcoming articles, then Nuget has also been integrated deeply into ASP .NET core. everything in ASP .NET core is a package and they are managed by NuGet.
ASP.NET Core Roadmap
Once we understand .Net Core Framework then we will take a look at new concepts like middleware, routing, tag helpers razor syntax and much more.
Now with ASP .NET Core, there are two ways to build a web application. One is razor their pages and the second approach is MVC application.
We will be building projects in both the technologies to understand how the basics work both the project.
Thank you for reading this article, I hope you will understand the .NET Core Framework. We’ll get into more details about this when we’ll learn how to Installing & Setting Up ASP.NET Core Development Environment in the next article.