What are the variations of ASP.NET? [duplicate]

this question already has answers here : What are .NET technologies and how do they relate to developing web systems? (2 responses) Closed 2 years ago .

What are the variations within ASP.NET?

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

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

I got to research about, but I couldn't quite understand.

 2
Author: LINQ, 2018-04-19

2 answers

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 to 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 state. You can see some state information in what is a "stateless protocol" such as HTTP?.

Nowadays the name represents more 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 whether it is WebForms, MVC, WebAPI, etc.

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

ASP.NET MVC

Is a "project type" ASP.NET which follows the MVC (Model-View-Controller) pattern-you can read more about the MVC pattern in What is MVC (Model, View, Controller)?. In it is practically intrinsic the ASP.NET Razor (I talk about it below) like view engine, in the old versions it was still possible to choose between the Razor and is called ASPX (which also ended up falling into disuse).

ASP.NET WebAPI

Is also a type of project ASP.NET which aims to meet HTTP requests (as well as in ASP.NET MVC), but without having to worry about views (unlike ASP.NET MVC).

In any case, 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 (just like .NET Framework). This one 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 the applications ASP.NET MVC (and also in Core applications). This tool is responsible for rendering the code written in the files.cshtml, .vbhtml and the like for HTML code. For more details about view engines you can read the question what is an Engine?, more specifically the answer of the Maniero that talks about the Razor itself.

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

 5
Author: LINQ, 2018-04-19 20:42:20

To complement LINQ answers

ASP.Net

ASP.Net it is a platform for creating Web applications. It's like a junction of the Old Classic ASP pages and the .NET Framework . In Classic ASP we wrote the server code in the middle of HTML, then the server read this code and rendered the page according to the instructions in VBScript (language used in Classic ASP pages along with HTML). O ASP.Net it was born from the junction of the best that had in the ASP Classic with the .NET framework.

ASP.Net Core

Recently .NET Framework Code began to be rewritten to be more modular and cross-platform, so .NET Core is the evolution of .NET .ASP.Net Core is an evolution of ASP.Net which was also rewritten.

ASP.Net MVC and Razor

MVC is a software architecture standard where business logic (business domain) is separated from presentation (web page or screen the interaction between the two layers is done through the Controller. O ASP.Net MVC is a platform that is based on ASP.Net and the MVC architecture and implements functionality to better work with model, vision, and controller interactions. 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 (presentation) layer it is necessary that the HTML pages have server codes too. It is possible to write HTML + C # in the same file, so the server interprets C# and renders the Pro user HTML page with the instructions passed by the language. To further facilitate this process was born Razor, which is the rendering platform for the ASP.Net MVC. With Razor you can create pages with C# code more productively because it greatly facilitates the interaction between Vision and control. The Razor code (files*.cshtml that are written in HTML, C# and Razor directives) is interpreted by the server and rendered according to the information and instructions passed in Razor (pseudo-language) and C#.

Conclusion

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

 1
Author: Raul Medeiros, 2018-04-19 17:30:12