ASP.NET Core 3 features

The Microsoft.AspNet.Core.All package in ASP.NET Core 2.0 contains all features in a single library. It includes authentication, Model-View-Controller (MVC), Razor, monitoring, Kestrel support, and much more.

Referencing Microsoft.ASP.Net.Core.All as a package has been discouraged since ASP.NET Core version 2.1, and this applies to the current version, 3.

We can still use the namespace by making use of patches, but the preferred replacement is the Microsoft.AspNetCore.App shared framework, details of which are explained in Chapter 4, Basic Concepts of ASP.NET Core 3 via a Custom Application: Part 1, when we expound the basic concepts of ASP.NET Core 3.

In an effort to make ASP.NET Core as lightweight as possible, and perhaps for better control, Microsoft decided only to let assemblies developed and maintainable in-house to be in the shared framework, and excluded third-party assemblies that were available with the Microsoft.AspNet.Core.All namespace.

Notable casualties that are not fully owned and therefore not fully controlled by Microsoft that were removed from the framework include Json.NET. We are, however, still able to use them by adding their references. 

ASP.NET Core 3 also allows us to create applications that follow the MVC architectural style, with a ready-made template that is available for use and we have dedicated a full chapter to this topic later in this book.

Furthermore, we can build HTTP-based web services as well as RESTful services. A new addition to the capability in implementing microservices, the gRPC template, that comes with ASP.NET Core 3 is introduced in the next section on what is new specifically to ASP.NET Core 3.

ASP.NET Core 3 fully supports Razor, which contains an efficient language for creating our views and Tag Helpers, which allow logic to be written from the server side to generate HTML that can be used in Razor views.

In terms of client-side development, ASP.NET Core 3 integrates and works hand in hand with several frameworks external to Microsoft including Angular, React, and React-Redux, although it must be noted that these will become less and less prominent, with an obvious attempt by Microsoft to handle similar functionality with in-house Razor components, otherwise known as Blazor.

Additionally, ASP.NET Core provides the following fundamental improvements:

  • ASP.NET MVC and the web API have been combined into a single framework.
  • The environment-based configuration system is ready for cloud hosting.
  • Dependency injection functionalities come by default.
  • You can host the same application in IIS, Docker, the cloud, and even in your own processes, or you can self-host.
  • There's new tooling that simplifies modern web development.
  • There's a simplified csproj file, making it easier to work with development environments other than Visual Studio (on Linux and macOS, for example).
  • Startup.cs has been simplified by moving logging and configuration into the host builder initialization.
  • ASP.NET Core apps can now be developed on Visual Studio for Mac.

The features we have seen could apply also to other versions of ASP.NET Core prior to 3, but others apply only to version 3 and maybe higher, in the future. We will look at them in the next section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.37.89