Live data from Hacker News

Understanding the .NET ecosystem: The evolution of .NET into .NET 7

andrewlock.net

311–320 of 357 posts

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#311

Doesn't run on Solaris and doesn't run on FreeBSD. An 'LTS' release means ... about 3 years. No thanks...

How relevant is Solaris these days? Does it even make sense for them to add support when such a tiny fraction people would use it?

It is still used by some, but most importantly it shows a lack of portability. In the past the view that "all the world's a VAX" hampered portability, now we have "Everything is MacOS/Windows/Linux"... yet lots of properly designed software is easily ported to all kinds of platforms, even the BeOS-derived Haiku...

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#312
post #133

My big problem with .NET is that a lot of line-of-business apps were written using ASP.NET Web Forms, but there is no upgrade path other than “rewrite most of it”. It feels like the pain everyone went through upgrading from Python 2 to Python 3. It also doesn’t help that .NET Framework has its support cycle tied to the OS, and hence is 10+ years. This means that businesses can be lazy and just leave these old apps to…

Technologies don’t live forever. At some point you need to upgrade, and at some points there will be some major breaking changes. .NET 4.8 is still fully supported, and there is no end-of-life communicated yet. It is a part of windows server 2022, which will be supported until 2031, that’s probably the earliest possible end-of-life date for .NET 4.8.

.NET Framework will be supported for much longer than that. It is used in many internal Windows components including MMC snap-ins, ADFS, and other Microsoft technologies like Exchange and Sharepoint.

Or maybe it will not be supported as in "we won't provide support for any applications needing .NET Framework, but they may or may not still work"?

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#313
post #278
post #229

Earlier quoted context omitted.

.NET IS open and not really tied to any Microsoft Subscription. I really hate when people keep parroting that without understanding. Rider is nowadays a better IDE for C# and it's not owned by Microsoft. You can host it wherever because it runs wherever.

Nah, Rider only better on cross platform Web development, and even then it fails short for Blazor.

In my experience, Rider is much a better IDE for development, especially on large codebases. In our few million LOC codebase, VS lags/hangs a lot, navigation is slow, search (like searching for a log string in a codebase) is awfully slow. Refactorings are not useful w/out Resharper etc.

VS has a lot of useful stuff around profiling, performance analysis etc, but as a code editor it's pretty bad.

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#314
post #26

Earlier quoted context omitted.

>We're moving to .Net, and I was surprised by how poor the built-in DB stuff is Right now EF Core is probably the best ORM that has ever existed. What exactly is missing? Although for performance you would probably reach for something like Dapper but that is not an ORM.

> Right now EF Core is probably the best ORM that has ever existed. What exactly is missing? Wish I could agree but they would have to fix the very slow time to first query when using big models (+500 tables in our case). Compiled models is not a solution for us since our model changes a lot and the compilation is just as slow. It's disappointing because it used to work fine under the ancient Linq2SQL library.

Are your models code first or reverse engineered?

Are you relying on model conventions or spelling out everything in modelBuilder calls?

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#315
post #268

Earlier quoted context omitted.

Yeah, if you stick to a very narrow subset of what it can do then you will have no problems. Hopefully everyone else on your project is on the same page about what that subset is.

I mean if your alternative is no-orm, inline SQL, then the “narrow subset” I’ve chosen is precisely competitive, and is highly effective, and IMO strictly an improvement. If your alternative is a different ORM, then my opinion is moot, but at least I’ve never seen an ORM be worth the headache (which is why we avoiding using the full feature-set in the first place) I don’t know why one would have an issue with not usi…

I’m a fan of Dapper for doing the tedious mapping and result set handling stuff but still sticking to SQL. I don’t really find writing LINQ instead of simple SQL queries is much of a time saver.

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#316
post #117

Earlier quoted context omitted.

You can use EF Core also with plain SQL queries, if you don’t like/trust the query builder. You can also disable change tracking completely, if you prefer to only INSERT/UPDATE directly with SQL statements. You get a lot of awesome features, but nobody forces you to use them.

Well that sounds a lot better than what my coworkers told me. Will definitely check out EF Core.

Yeah, EF's Interpolated Execute methods are a massive step up over raw ADO.NET ("assembly"), even if you don't use most of the other modeling tools and context tracking.

The Interpolated family of methods take nice, clean string interpolation like $"Select * from Table where Id = {Id}" and make sure that is properly parametric SQL queries (ie, avoiding things like SQL injection attacks).

It's a killer feature and I have some idea why it lives in the EF side of the house rather than being generally applied across all of ADO.NET, but it should still probably be a more reusable library of its own beyond just EF.

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#317
post #14

Earlier quoted context omitted.

It really is like finding enlightenment after having to figure out which third party package is best for every little thing in Node. Visual Studio is a pretty powerful IDE as well.

It better be at a 30GB install size.

Mine's generally around 10GB as I omit all the mobile dev stack and images.

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#318

Earlier quoted context omitted.

As a sibling commenter mentioned, there’s a minimalist functional web server available out of the box, that can later have other more complex components added on: https://learn.microsoft.com/en-us/aspnet/core/tutorials/min-... It’s .NET 101 stuff.

I'm sorry, I think I really must be missing something out and/or explained myself poorly, but I don't see how this is comparable... Doesn't `WebApplication.CreateBuilder(args).Build()` creates a whole web application type thing? In my understanding it's something comparable to `gin.Default()` or `flask.Flask(__name__)`, rather than lower level basic `http.Server{Addr: addr}` or `http.server.HTTPServer(address)` (whic…

WebApplicationBuilder itself is mostly the base .NET Generic Host [1] (which is "bare" .NET and is used as a common host for dependency injection plus common utilities such as configuration and logging) plus activating the Kestrel hooks for HTTP middleware. Kestrel even at its most "raw" is always slightly higher-level and closer to Flask or Express (JS) as a middleware-focused HTTP execution engine.

(This partly reflects the classic HTTP.SYS role in IIS/Windows as well, because Window's HTTP.SYS is surprisingly high level for a "raw" kernel component for hosting web servers. From my understanding, most of "Kestrel" under-the-hood is just a cross-platform semi-recreation of the HTTP.SYS abstraction machine on top of things like but maybe not exactly libuv/ioring. So yes, everything is "naturally" higher level in .NET than Python's lowest level just because it assumes a higher-level "OS server" base.)

Also, yes, the boundary between "Kestrel" and ASP.NET is really hard to define at this point. Almost all of ASP.NET is just "Express-style" (though much of these middleware patterns in ASP.NET I believe predate Express) middleware that is cumulatively stacked on top of each other as you add more high-level ASP.NET features, and at this point all of them are just about optional depending on what you are looking to do.

Even many alternatives to ASP.NET at this point are built on top of the core basics like WebApplicationBuilder, they just diverge at which sets of middleware stack on top of that.

As others point out the recently expanded "Minimal APIs" experience is most tuned for "Flask-like" out-of-the-box behavior: https://learn.microsoft.com/en-us/aspnet/core/fundamentals/m...

That's as low level as it gets in .NET, but not so much because of "strong coupling" but because "everything is middleware" in .NET.

[1] https://learn.microsoft.com/en-us/dotnet/core/extensions/gen...

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#319
post #313
post #278

Earlier quoted context omitted.

Nah, Rider only better on cross platform Web development, and even then it fails short for Blazor.

In my experience, Rider is much a better IDE for development, especially on large codebases. In our few million LOC codebase, VS lags/hangs a lot, navigation is slow, search (like searching for a log string in a codebase) is awfully slow. Refactorings are not useful w/out Resharper etc. VS has a lot of useful stuff around profiling, performance analysis etc, but as a code editor it's pretty bad.

VS lags/hangs a lot with Resharper installed. As someone who doesn't like/trust Resharper, I have a very different experience of VS performance.

(Also, Roslyn built-in refactorings have gotten so good, I increasingly feel like I should just develop more in VS Code because the language server is the same.)

Re: Understanding the .NET ecosystem: The evolution of .NET into .NET 7

#320

Earlier quoted context omitted.

The writing was on the wall a long, long time ago! These companies had 15 years to do it. And it was fairly easy to get webforms + MVC running side-by-side on the same site so you could gradually migrate. Too late for that now though, you can't run webforms + MVC Core side-by-side. You could put a load balancer in front of the old app and start moving end points to a new code base. It's akin to moaning that MS haven'…

> The writing was on the wall a long, long time ago! [...] These companies had 15 years to do it. I pointed this out in 2013 only to be literally shouted down by my manager. I did so again in 2017 under a different manager on the same team with the suggestion that we investigate using SPAs and RESTful frameworks only to be told that Razor Pages was the way forward which, while an improvement, didn't do any wonders fo…

> You can probably see why developers that chose this framework in the first place aren't interested in upgrading... learning actual web standards and state management isn't something they wanted to do in the first place.

This is why I'm personally extremely skeptical of both Razor Pages and all of Blazor (Client, Server, Unified, whatever). All of that feels a lot like "Web Forms Again, this time with more C#" to me. Parts of Blazor especially may as well be ASP Classic `runat="server"` and look just like it to me. It kind of feels like a lot of ASP developers have already forgotten the hard problems of ASP Classic and ASP.NET Web Forms and have been doomed to recreate them cyclically.

Post reply on HN