Anything like PHP's PSR-7/15 for C# and ASP.NET Core?

Rasmus Schultz - Apr 17 '19 - - Dev Community

I've been using PHP for the past 5 years or so, and I'm taking a look at C#, which I last used 5-6 years ago.

A lot has happened, it seems.

One of the greatest pains was threading issues (locks and mutexes, ugh) and it looks like async and await will make for a more painless experience in that department, so that's good.

The platform and the new .NET Core run-times are now cross-platform with Linux and Mac support, so that's a huge plus.

But where's the simple, elegant, straight-forward, no-frills, no-bells, no-whistles HTTP kernel I'm looking for?

These past years, with the PSR-7 HTTP model, and PSR-15 middleware model, I've grown accustomed to a very simple and elegant HTTP abstraction consisting of a few interfaces and a trivial middleware stack - I build everything from the ground up with a DI container at the center of everything, which provides me with a huge degree of freedom, flexibility, control and ease of use, with very few moving parts, easy debugging, and nothing to get in the way of handling any special case or requirement.

Everything I can find for C# looks overly complex, bloated - everything seems to be based on the idea of "standard architecture" with a bunch of hooks and configuration that lets choose from lots of tailored options and plug things in.

After the success we've had with PSR-7/15, after seeing how happy my fellow developers are working with something much more simple and open, frankly, it would feel like a huge setback, going back to the kind of "fill in the blanks" architecture of "web" frameworks (way too broad!) that we put of with before we discovered things like Express.js, PSR-15 and similar middleware stacks on other platforms.

All I really want is a simple Request and Response model, and a very basic Request => Response middleware abstraction (e.g. PSR-15's HandlerInterface would do nicely) that plugs into a simple HTTP Host that does the hard work.

Surely there has got to be something like that for C#/.NET Core?

Why am I not finding it?

. . . . . . . . . . . . . . . . . .
Terabox Video Player