A
A
Alexander Lamdan2020-12-29 23:24:46
C++ / C#
Alexander Lamdan, 2020-12-29 23:24:46

Is it possible to write a backend in pure C#, like in PHP? Without involving frameworks?

I mean, is it possible to write an example of a landing page with a form to fill in the data, enter it into the database, get it from the database without involving the whole ASP.NET architecture?

First of all, I ask so that as a PHP back-end developer, I can learn C-sharp and try to create projects on the web without using frameworks for fun.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nokimaro, 2020-12-29
@alexander_lamdan

It is possible, but not necessary.

HttpListener listener = new HttpListener();
listener.Prefixes.Add ("http://localhost:51111/MyApp/"); // Listen on 51111
listener.Start();

as an alternative to
https://github.com/dotnet-websharper/core

V
Vasily Bannikov, 2020-12-29
@vabka

Comparing PHP and C# is not correct.
1. PHP was originally made for the web
2. PHP is interpreted
3. Apache takes a lot of responsibility for processing the request.
C# development uses asp net core, which houses the kestrel web server, which takes care of the network and HTTP.
Basically, you can try to use CGI along with C#, but that's a bad idea.

A
Alexander Ananiev, 2020-12-29
@SaNNy32

It is possible, but too labor intensive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question