Live data from Hacker News

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

andrewlock.net

191–200 of 357 posts

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

#191

Earlier quoted context omitted.

No, really, version numbers within a broader brand that can indicate incompatibility are not something non-technical users with any familiarity with modern consumer society are unfamiliar with. I get that techies sometimes have preferences for perfect and eternal backward compatibility within a named product line, but trying to pass this off with “how will you explain this to non-techies”, and then treating non-techi…

"Our app was seamlessly upgraded from .NET 3.5 SP1 to .NET 4.0 and through to .NET 4.8.2. I don't believe you when you say it won't immediately run on .NET 5.0. My PS5 plays PS4 games. Upgrade it today as I'm off to play golf."

> My PS5 plays PS4 games.

That sounds like an outlier, though. Typically, consoles were not compatible between generations. PS1 games didn't play on PS2. PS2 games didn't play on PS3. Etc.

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

#192
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.

If people are looking at what technologies and companies to invest in, knowing that they may be left high and dry with a "full rewrite"-level of breaking changes is a valid and relevant critique. You want to know you'll be supported through difficult transitions, and that isn't unreasonable.

I don't understand why people are coming out of the woodwork to tell everyone that full rewrites are a perfectly normal and expected regular occurrence that you should expect from your tech choice. Python 3 is famous for how much they hurt themselves by ignoring the problem. Many companies never did migrate from 2 to 3, and instead picked tech with better guarantees. I expect the same to occur with .Net Framework.

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

#193
post #105

Earlier quoted context omitted.

Yeah, but from what I saw it doesn't help much with master-detail setups? Like, inserting or updating an order with order lines etc. We rely heavily on those.

Maybe also check PetaPoco. But at this point you're getting closer and closer to code-first EF Core anyway. :) https://github.com/CollaboratingPlatypus/PetaPoco

I haven't actually tried either Dapper or PetaPoco, only perused their documentation. But I was sold on LinqToDb after seeing how it supported CTE and seeing our close code to generate updates [1] and joins [2] ended up looking like the actual intended SQL.

  [1]: https://linq2db.github.io/#update

  [2]: https://linq2db.github.io/articles/sql/Join-Operators.html

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

#194

I spent a lot of time as a Java developer and have recently moved into a spot where I'm being asked to work with C#. A few things rub me the wrong way, and I'm wondering if it's just ignorance and / or me being stuck in my old ways. - Unit testing with mocking is kludgy compared to Java and Kotlin (Moq vs Mockito). There's no mocking of concrete implementations for technical reasons, perhaps unless you shell out mone…

> There is no mocking of concrete implementations That's an obvious anti-pattern in the first place, especially when you know the optimizer could inline hot code and optimize the function out. > Everything feels a lot more corporartized or tied to Microsoft Remember J2EE and the confusing javax stuff? They're the same and fortunately both are waning out. > The open source ecosystem and tooling around C# isn't to the…

What's wrong with mocking concrete implementations? I've worked on pretty large-scale services with AWS and we did it all day everyday. I think it worked fine and don't know if adding an interface on top of them would help.

I don't really remember J2EE, but I do run into weird Javax imports from time to time. +1 on them going away being a good thing.

For the open source stuff, I don't really care that much about the politics or history of it. Maybe I should, but at the end of the day Java just seems to have the libraries I need.

And for the project structure, maybe I should have worded that differently. The structure of nested projects makes sense, but the dependency management through Nuget and the hidden project files in IDEs just seems needlessly indirect - just show me files and let me add text for a dependency like in Maven or Gradle. To be fair, I think this one is partially just me being new to the .NET world.

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

#195
post #12

Been using .NET for years now for backend web development after having taken a break from C#. It is such an improvement over the old .NET framework. When I started building my first backend with it, I was surprised how much was included and "just worked". Need to add authentication? Few lines. OAuth? Also built in. Response caching? Yes. ORM? EF Core is pretty good. Need to use env variables to override your JSON con…

I have been having a ridiculous time trying to find out just how to override an appsettings json variable (DBConnection string) with an environment variable. Could not find any good answer. What is the right way?

You can have multiple appsettings files and are additive. Eg, you can have appsettings.production.json which only contains an override for the connection string in the base appsettings.json.

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

#196
post #183

Earlier quoted context omitted.

I'm definitely a fan of the "batteries included" approach, but I am ambivalent on EF because I feel like it is still a bit too magic and gets abused. Though it's not like it's a big deal to use whatever else you prefer instead (I am a big fan of the inline SQL with Dapper approach).

I stuck to DB-First model + LINQ + SaveChanges() and largely managed to keep out the magic quite successfully for a .NET6 web project last year. Records are fantastic when composing queries. I didn't touch inheritance or any fancy mapping strategies -- one table, one class. The only bit of framework-specific / hidden magic debugging I really had to do was the realization of AsSplitQuery() when creating objects compos…

What is DB-First model ?

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

#197
post #64

Earlier quoted context omitted.

It better be at a 30GB install size.

A 2TB nvme drive is less than $200. If VS is saving significant dev time, people would install it even if much larger install.

IDK if it's related but I have like a 50% install success rate. Seems to be complicated.

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

#198

I spent a lot of time as a Java developer and have recently moved into a spot where I'm being asked to work with C#. A few things rub me the wrong way, and I'm wondering if it's just ignorance and / or me being stuck in my old ways. - Unit testing with mocking is kludgy compared to Java and Kotlin (Moq vs Mockito). There's no mocking of concrete implementations for technical reasons, perhaps unless you shell out mone…

> There's no mocking of concrete implementations

That was always halfway between oxymoron and forbidden magic.

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

#199
post #72

Odd question maybe, my company uses C# and I've been picking up more backend responsibilities. However, I'm a Linux and Neovim user. I do have Windows and Visual Studio available but I just find it awkward. Is anyone here having success with Linux and Neovim for C#? Even trying to learn more about the language is awkward as so many resources go straight into VS.

Sadly, OmniSharp (the LSP for vscode and nvim) isn't all that great. The performance is incredibly bad, easily orders of magnitude worse than VS and Rider.

There is this alternative LSP, which I plan to try out still: https://github.com/razzmatazz/csharp-language-server

At the moment I'm stuck with Rider, which is terrible (there is an official vim mode plugin), but I still have to port my bindings over to their vim config. Telescope etc. isn't available, which is a sad day.

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

#200

Imagine it like a Git repo. Old .NET Framework was a main, Windows only, branch of .NET. At tag "v4.x", a new branch named 'Core' was created. Core was a multiplatform version of .NET. There were three tags in the Core branch: v1, v2 & v3. Then Core jumped from v3 to v5 and was merged back into the main branch. ".NET Core" has replaced ".NET Framework". Also, v5 dropped 'Core' from the name and was named just ".NET 5…

[deleted]
Post reply on HN