ASP.NET Core Overview

What is ASP.NET Core?

ASP.NET Core is the open-source version of ASP.NET that runs on macOS, Linux, and Windows.

ASP.NET Core is a cross-platform, high-performance, open source framework for building modern, cloud-based, Internet-connected applications. ASP.NET Core is a redesign of ASP.NET 4.x, initially called ASP.NET 5, but later renamed to ASP.NET Core 1.0.

 

Benefits & Features

  •          Cross Platform

o    ASP.NET 4.x applications run only on windows, whereas ASP.NET Core applications can be developed and run across different platforms like Windows, macOS or Linux.

o    ASP.NET 4.x applications can be hosted only on IIS, where as ASP.NET Core applications can be hosted on IIS, Apache, Docker, or even self-host in your own process.

o    From a development standpoint, you can either use Visual Studio or Visual Studio Code for building .NET Core applications. You can also use third party editors like Sublime.

 

  •          Unified Programming Model for MVC and Web API

o    With ASP.NET core, we use the same unified programming model to create MVC style web applications and ASP.NET Web API's.

o    In both the cases, the Controller that we create inherits from the same Controller base class and returns IActionResult.

o    IActionResult is an interface and it has got several implementations. ViewResult and JsonResult are just 2 examples of the built-in result types that implement IActionResult interface.

o    In the case of a Web API, the controller returns a JsonResult and in the case of an MVC style web application it returns a ViewResult.

 

  •          Dependency Injection

o    ASP.NET Core has built-in support for dependency injection. In ASP.NET Core Dependency Injection is an integral part. Dependency Injection allows us to create systems that are loosely coupled, extensible and easily testable.


 

  •          Testability

o    With built-in dependency injection and the unified programming model unit testing ASP.NET Core applications is easy.

 

  •          Open-source and community-focused

o    ASP.NET Core is fully open source and is being actively developed by the .NET team in collaboration with a vast community of open source developers.

o    So, ASP.NET core is continually evolving as the vast community behind it is suggesting ways to improve it and help fix bugs and problems.

 

  •          Modular HTTP Request Pipeline

o     ASP.NET Core Provides Modularity with Middleware Components. In ASP.NET Core, we compose the request and response pipeline using the middleware components.

§  Middleware is software/programme that's assembled into an app pipeline to handle requests and responses.

o    It includes a rich set of built-in middleware components. We can also write our own custom middleware components.







Comments