EMZETT.
Login

ASP

In short: Microsoft’s technology for server-side web applications — the current version, ASP.NET Core, runs cross-platform (Windows, Linux, macOS) with C#.

In more detail: The original “Classic ASP” (1996) was Windows-exclusive and only ran with VBScript/JScript. Its successor, ASP.NET (and its modern, open-source successor ASP.NET Core), is considerably more powerful, platform-independent, and primarily developed with C#.

In Depth

From Classic ASP to ASP.NET Core

The original “Classic ASP” (1996) was Windows-exclusive, ran only in the Internet Information Services (IIS) web server, and was written in VBScript or JScript — technically simple embedded code in HTML pages, similar to early PHP. ASP.NET (2002) replaced this with a full-fledged, object-oriented framework based on .NET, but remained closely tied to Windows and IIS.

ASP.NET Core (since 2016) was then a complete rebuild of the framework as an open-source, cross-platform project — a clear break from the old .NET Framework. This redevelopment coincided with Microsoft’s broader strategic openness towards open source and Linux (under CEO Satya Nadella from 2014), after the company had at times openly fought Linux under previous leadership.

Programming models

ASP.NET Core offers various programming models for different use cases:

  • MVC (Model-View-Controller): for classic web applications with server-side rendered pages (Razor views, HTML templates with embedded C#).
  • Web API: for pure REST interfaces without HTML rendering, usually as a backend for a separate frontend (React, Angular, mobile app).
  • Blazor: interactive frontend logic entirely in C# instead of JavaScript, either rendered server-side (Blazor Server) or compiled to WebAssembly and run in the browser (Blazor WebAssembly) — for teams that would rather not maintain two languages (C# backend + JavaScript frontend).
  • Minimal APIs: since .NET 6, a lean syntax for simple endpoints without much boilerplate code.

A minimal ASP.NET Core API looks like this, for example:

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
 
app.MapGet("/hello", () => "Hello World!");
app.MapGet("/products/{id}", (int id) => $"Product {id}");
 
app.Run();

Performance and use cases

ASP.NET Core regularly ranks as one of the most performant web frameworks in independent benchmarks (e.g. TechEmpower), considerably ahead of many dynamic languages like Python/Ruby and often also ahead of Node.js — a result of the mature .NET runtime and compiled, statically typed code. Compared to backends based on Node.js, ASP.NET Core especially shines in very performance-critical enterprise applications and in environments already heavily invested in the Microsoft ecosystem (Windows Server, Active Directory for authentication, Azure as the cloud provider) — integration into these systems is considerably smoother than with foreign-language stacks.

Entity Framework as an ORM

ASP.NET applications usually access databases via Entity Framework Core — an object-relational mapper (ORM) that maps database tables to C# classes, conceptually comparable to Drizzle ORM in the Node.js ecosystem, but more deeply integrated into .NET (e.g. through LINQ, a query syntax built into the language that can be applied equally to databases, in-memory collections and XML).

See also: C#, API