Before talking about ASP.NET Core, we should know what ASP.NET is. ASP.NET is a web application framework developed by Microsoft to build web applications and services. It extends the .NET platform with tools and libraries specifically for building web apps.
These are some things that ASP.NET adds to the .NET platform:
ASP.NET supports a number of programming models for building web applications and services:
ASP.NET Core is the open-source version of ASP.NET, it is a cross-platform framework for building web applications and web APIs that runs on macOS, Linux, and Windows. ASP.NET Core was first released in 2016 and is a redesign of earlier Windows-only versions of ASP.NET 4.x, with architectural changes that result in a leaner, more modular framework. With ASP.NET Core, you can:
The following diagram shows the relationship between ASP.NET Core, ASP.NET, .NET Core, and .NET Framework. ASP.NET Core runs on both .NET Framework and .NET Core, so it can run cross-platform. Conversely, ASP.NET runs on .NET Framework only, so is tied to the Windows OS.
ASP.NET Core provides the following benefits:
ASP.NET Core provides the following components:
ASP.NET Core 2.x can target .NET Core or .NET Framework. ASP.NET Core apps targeting .NET Framework aren't cross-platform—they run on Windows only. Generally, ASP.NET Core 2.x is made up of .NET Standard libraries. Libraries written with .NET Standard 2.0 run on any .NET platform that implements .NET Standard 2.0.
ASP.NET Core 2.x is supported on .NET Framework versions that implement .NET Standard 2.0:
However ASP.NET Core 3.0 and later will only run on .NET Core. dropping support of .NET Framework.
ASP.NET Web Forms allowed developers to rapidly create web applications using a graphical designer and a simple event model that mirrored desktop application building techniques. But over time, it became apparent that ASP.NET Web Forms suffered from many issues, especially when building larger applications. In particular, a lack of testability, a complex stateful model, and limited influence over the generated HTML (making client-side development difficult) led developers to evaluate other options.
For example, ASP.NET Web Forms use ViewState to maintain the states between the client and server, you can see a hidden input type in the source code of an ASPX web page:
The problem with ViewState is the size. For years .NET developers forced to transfer kilobytes of useless information, like states of 20 controls for every roundtrip.
All three are ASP.NET technologies for creating dynamic web applications:
In general, the choice of which framework to use depends on your background and experience with ASP.NET.
© 2022 Digcode.com