What are the variations of ASP.NET?

Asked

Viewed 824 times

2

What are the variations existing within ASP.NET?

The main characteristics and for what type of activity they are most recommended?

When researching I have come across for example ASP.NET, ASP.NET MVC, ASP.NET Core, ASP.NET Razor.

I did some research, but I couldn’t quite understand.

2 answers

5


ASP.NET

Initially it was what we call Webforms today. Webforms was used a lot, but it has already fallen into disuse and, apparently, fell into the disgust of the staff. I can’t say in detail, but the idea of Webforms was to build a web application that was more like desktop applications, trying to maintain status. You can see some status information on What is a "stateless protocol", like HTTP?.

Nowadays the name represents more the platform itself. So much so that, in Visual Studio, to create a web application it is first necessary to choose the type ASP.NET Application and only then you need to specify if it is Webforms, MVC, Webapi, etc.

Each of these "types" has a different way of working, ranging from the philosophy and pattern of the project to how the code is written.

ASP.NET MVC

It is an ASP.NET "project type" that follows the MVC (Model-View-Controller) standard - you can read more about the MVC standard in What is MVC(Model, View, Controller)?. In it is practically intrinsic the ASP.NET Razor (I speak below about it) as view engine, in the old versions it was still possible to choose between the Razor and calls itself ASPX (which also ended up falling into disuse).

ASP.NET Webapi

It is also a type of ASP.NET project that aims to meet HTTP requests (as well as ASP.NET MVC), but without having to worry about the views (unlike ASP.NET MVC).

Anyway, the organization of the project is very similar to that of ASP.NET MVC.

ASP.NET Core

is the new ASP.NET. Yes, the framework has been redesigned and rewritten (as well as .NET Framework). It has had other names like: ASP.NET vNext or ASP.NET 5, as can be seen here.

ASP.NET Razor

Is the view engine behind ASP.NET MVC applications (and also in Core applications). This tool is responsible for rendering the code written in the files .cshtml, .vbhtml and related to HTML code. For more details on view Engines you can read the question What is an Engine?, more specifically the maniero’s response who talks about Razor himself.

In ASP.NET Core, there is also ASP.NET Razor Pages. It is a kind of simplification of what already exists in ASP.NET Core MVC. It is recommended for simpler cases that do not need all the MVC bureaucracy.

1

To complement LINQ responses

ASP.Net

ASP.Net is a platform for creating web applications. It is like a junction of the old ASP Classic pages and the . Net Framework. In classic ASP we wrote server code in the middle of HTML, so the server read this code and rendered the page according to the instructions in Vbscript (language used in the Classic ASP pages along with HTML). ASP.Net was born from combining the best ASP Classic with the . Net framework.

ASP.Net Core

Recently the code of the framework . Net began to be rewritten to be more modular and cross-platform, so . Net Core is the evolution of .Net. Therefore, ASP.Net Core is an evolution of ASP.Net that has also been rewritten.

ASP.Net MVC and Razor

MVC is a software architecture standard where the business logic (business domain) is separated from the presentation (web page or screen of a program) and the interaction between the two layers is made through the Controller. ASP.Net MVC is a platform based on ASP.Net and the MVC architecture and implements functionalities to better work with the interactions between the Model, Vision and Controller. Control and business logic (Model) are written in server language, i.e., C# or VB. In order for the server to communicate with the View layer (presentation) it is necessary that the HTML pages have server codes as well. It is possible to write HTML + C# in the same file, so the server interprets C# and renders the HTML page pro user with the instructions passed by the language. To further facilitate this process, Razor was born, which is the rendering platform for ASP.Net MVC. With Razor you can create pages with C# code more productively because it makes the interaction between Vision and Control much easier. The Razor code ( *.cshtml files that are written in HTML, C# and Razor directives) is interpreted by the server and rendered according to the information and instructions given in Razor (pseudo-language) and C#.

Completion

One platform is the complement of the other to accomplish a specific goal. . Net Core is the basis for ASP.Net, which allows you to create server-rendered web pages. ASP.Net MVC is the MVC standard implemented on the ASP.Net platform, functioning as a platform with functionalities that facilitate MVC interactions. Razor is a pseudo programming language, which works on the MVC View layer, which is interpreted by the server and thus generated the HTML page.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.