(ASP).NET Core - The Good, the Bad, and The Ugly

My long overdue feedback on .NET Core. Spoiler: Where there is light, there must be shadow somewhere.

When .NET Core was announced the hype was real: A new ecosystem based on an a very popular and established one, a modern architecture, and good cross-platform support from the start. The possibility for Ahead-of-Time (AoT) compilation was rumored. Many demos have been given. What remains?

In the beginning the tooling proved to be very unstable. Changes on a daily basis have been no surprise and demos on stage broke due to a new update ("hey that worked yesterday, when I rehearsed"). People already stopped believing...

After the dust settled the real problems arrived: How to make anything productive work on this new platform? The most important APIs have been missing and it was just not popular to take any .NET 4+ library and plug it in. Maybe for a DTO only library code sharing was still a thing, but once a certain .NET API coverage was needed there was an uncomfortable incompatibility arising.

At this time the idea of .NET Standard was revealed. The successor to PCL simplified a lot of things, but the communication could not be worse. While .NET Standard is just a specification (covering a certain set of .NET APIs), .NET Core (and the classic .NET Framework) are just an implementation providing the APIs that .NET Standard references. People did not get this. And those, who got it again have been punished by the incomplete tooling.

Now fast forward we got .NET Standard 2 (major leap forward) and .NET Core 2 (major leap forward). Tooling of these two technologies stabilized pretty much, but its still partially glued into Visual Studio, making it terrible to upgrade or transparently manipulate by the developer. With Node.js / NPM / TypeScript I just install the version of TypeScript I'd like to use for my project as a dependency. Problem solved. In Visual Studio with C# I cannot reliably select an existing version or update to a new version without going to full lengths and breaking many things. How is this even possible in 2018?

This brings me to the main point of this post: ASP.NET Core. In theory ASP.NET Core is the logical successors to all troubles with ASP.NET. It was rewritten from the ground up. It is very modular. If one likes MVC you can drop it in. If one likes Web API you can drop it in. If one likes WebForms you can drop it in. Sounds great, right? The middleware concept (like so many other things) has been burrowed from Node.js. What can go wrong?

Well, tooling again! How can it be that I am productive these days using the free VS Code editor than using the paid version of Visual Studio. Why do I get mysterious errors, binding conflicts, any very intransparent errors in the latter, while the former just works? And I am not alone...

The more videos I watch from popular Microsoft evangelists trying to advocate ASP.NET Core on some conferences (e.g., Jon Galloway, Scott Hanselman, ...) the more I get the feeling even these guys have no idea how the tooling is supposed to work these days. I can't remember the last talk where no problems with tooling could be witnessed. Many times these people just switch to the command line to fix issues. Yes, I love the command line, but you cannot expect standard developers to still invest in Visual Studio when its more in your way than helpful. After all, the reason for going into the command line is that Visual Studio magically changed something to become a problem in the first place.

ASP.NET (Core) may be the best framework to create a TODO app in 10 minutes, but anything beyond that is just painful, slow, and overly complicated. How often have I heard "I don't know why my ASP.NET Core web app is so slow, but it needs 3-4 seconds to wake up"? Not a good sign.

So what is the best part about ASP.NET Core? I still think their direction is the right one, and I think they have a fantastic team and community behind it. This is a good basis, but it could not be enough. The bad side is that other technologies and frameworks have simply outgrown ASP.NET. While the .NET guys already start betting on Blazor (old story of bringing .NET to the browser, this time using WASM) it feels like they are again fighting an uphill battle. In the meantime TypeScript is having one successful release after the other, with transforms you can do meta programming already (a feature missing in C#, which stopped at analyzers), plus you can target server and client in one language.

Nevertheless, the real ugly part is that a crucial part of the community has left the sinking ship already years ago. I see this in my own community projects. I have zero motivation to continue there, because on the one hand it seems that Microsoft itself does not care enough, on the other hand general platform stability (e.g., the mentioned tooling) is just not stable enough. If I put in 3 hours of (voluntary) work per week I'd like to spend these hours well. Not fighting against the tooling, but fixing issues and providing new features for users of these projects. Right now for every 30 minutes I spend on my .NET projects I spend like 25 minutes on fixing tooling (independent on what machine, sometimes these are new installs, sometimes these are established systems).

What remains from this post? Currently, I am not doing much .NET Core (or ASP.NET Core). The simple reason is that I am not feeling very productive in this whole stack and I am also not feeling very comfortable in it either. I feel like if something's happening there is no way for me to fix it. On other platforms I feel in control and capable of doing monkey patching if necessary.

Maybe I should go back to treat (ASP).NET Core what it was: A proof of concept of a new ecosystem based on an old one, that showcases how the feature of .NET can look like, but without any tooling.

Created .

References

Sharing is caring!