ASP.NET Core And History Of Microsoft Web Stack

Microsoft .NET Core

In this article I will discuss about Microsoft .NET Core. Microsoft .NET Core is a completely new thing in the Microsoft web stack when it was introduced. So before going to .NET Core some introduction of the history of .NET web stack is necessary.

ASP.NET Web forms

ASP.NET Web forms were released with the first version of .NET in 2002. In early web development ,web forms were the heart of ASP.NET. Web forms provide the User Interface UI of the application. In web forms developers have two options to design the UI. The first is to use tool box and design UI by dragging and dropping every control and setting the layout of the web page. The second is to write full HTML scripts in order to add controls like textbox, labels, buttons etc. In design view, web page written in HTML code looks similar to that which is done by drag and drop of controls. The logic of the page is in .cs file where C# or VB code is available. Later web forms are enhanced and thier functionality become more and more better by use of bootstrap, javascript and other javascript libraries.

ASP.NET MVC

In 2009, Microsoft introduced a new framework for web development named ASP.NET MVC, which is based on Models, Views and Controllers patterns to keep a separation between business logic and presentation logic and allow complete control over HTML markup. For developers, it became more easy to write code in ASP.NET MVC as compared to Web forms. It was so easy to write code as Models, handle the business logic in controllers and generate Views from controllers. Everything is controlled in ASP.NET MVC.

But ASP.NET MVC, although solving the problem of slow release cycle and removing HTML markup abstraction, still suffered from the dependency on .NET framework and System.Web which strictly made it coupled with IIS and windows.

ASP.NET Web API

Later a new web programming model was introduced by Microsoft. In this model, instead of processing the data server-side and sending fully rendered pages to the browser this new paradigm was introduced. It is also called Single Page Application (SPA). It used mostly in static web pages which fetches data with ajax from server and renders the UI directly on the client with javascript.

This library was even more modular than libraries. It was developed by Windows Communication Foundataion (WCF) team instead of ASP.NET team so it don't rely on System.Web and IIS. This made this library completely independent from ASP.NET and IIS.
.NET Core



What brought .NET Core?

With the latest iterations of libraries, it was clear that the maximum potential of full .NET framework had been reached. But, still many issues remained opened:
  • .NET applications couldn't be run on non-windows system.
  • The dependency on the full framework made the .NET apps less suitable for high density scenarios, like Cloud where hundred of applications run on a single machine and must scale up very fast.
  • The complexity of the .NET project system prevented the development of .NET apps outside of Visual Studio.
It became clear that the only solution was to start from scratch, redesigning the ASP.NET framework to be fully modular with clearly implemented, generic foundations. It also needed to be cross platform.

For these reasons, Microsoft completely rebuilt ASP.NET Core based on a new cross-platform .NET runtime, which is now known as .NET Core. Now, the applications built in .NET Core can run on Windows as well as Mac and Linux.