Live data from Hacker News

The Case for C# and .NET

chrlschn.medium.com

141–150 of 376 posts

Re: The Case for C# and .NET

#141

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

About the 'dependency problem':

It's not as bad as in npm with node_modules, because .NET provides a lot of base functionality in the standard library.

But when you start to use multiple nuget packages, sooner or later you will also enter dependency hell, where managing versions and updates of nuget packages gets very painful.

All in all we have to reference about 10 external libraries. The visual studio nuget package manager started to be frustrating if you need to manage those dependencies in multiple solutions. We therefore switched to Central Package Management [1], but then you realize, that you're just shifting the problem around. Now we have to put the whole dependency tree into the file 'Directory.Packages.props' and have to manage the version of 140 libraries. If there are version conflicts, we force nuget to use the latest version and just hope for the best.

Managing versions of dependencies and dependencies of dependencies is a major pain, but it's an ubiquous pain all programming environments share. And no, .NET won't relieve you from that.

[1] https://docs.microsoft.com/en-us/nuget/consume-packages/cent...

Re: The Case for C# and .NET

#142
post #139
post #127

Earlier quoted context omitted.

This. https://isdotnetopen.com/

The page is 100% accurate but so FUDy ;). Not helpful. If Microsoft would only clearly and trustworthy communicate.

Microsoft and trustworthy communication can't me mentioned rationally in the same sentence. I've been working with them as a customer and partner for 30 years and have been screwed over and over again. They are the worst company I've ever worked with or for or with their technology.

Re: The Case for C# and .NET

#143

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

About the 'dependency problem': It's not as bad as in npm with node_modules, because .NET provides a lot of base functionality in the standard library. But when you start to use multiple nuget packages, sooner or later you will also enter dependency hell, where managing versions and updates of nuget packages gets very painful. All in all we have to reference about 10 external libraries. The visual studio nuget packag…

I'm not sure if it will help in your scenario, but faced with a similar problem (~80 project solution, mixed c#/f#, with varying dependencies), I found success with Paket (https://github.com/fsprojects/Paket)

It is much more prevalent in the f# community (at this point `dotnet restore` is a perfectly fine default until you hit trouble), but isn't limited to just being applied there.

Re: The Case for C# and .NET

#144
post #129

Hot reload for ASP.NET works fine nowadays in VS and even with older versions of .NET. Dependency handling is still a large problem with .NET. Especially since current is often used instead of LTS. There is also no good way of sharing code between applications. Arrow functions, btw, solves the this/that problem in JS making React development easier etc.

What do you mean when you say there is no good way to share code between applications?

What I see a lot is private Nuget packages with common functionality used within several applications at companies. These are often binaries (one can place code in a Nuget packages but it won’t update, at least not last time I tested it). In the world pre GIT it was common to link in these files and build them along with the solution. Meaning, one did not have to try to align every .NET version or keep adding build targets to the Nuget packages.

Re: The Case for C# and .NET

#145

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

I tried writing a simple crud api with asp.net, which should parse and respond json. It was the worst development experience I ever had while writing json apis. Validation? Not existent. OpenAPI/swagger documentation generation? Not existent. Then it also tried to force me into using MVC, while acting that it is express with its middlewares. I switched back to node.js with fastify and wrote my app in an hour. I reall…

I think for swagger documentation you install the swashbuckle nuget package and then add these three lines

services.AddSwaggerGen();

app.UseSwagger();

app.UseSwaggerUI();

Re: The Case for C# and .NET

#146

Earlier quoted context omitted.

That sure isn't my understanding if you work for a large enough business. It is very explicitly NOT free. https://visualstudio.microsoft.com/license-terms/mlt031819/ This is the rare post where I would be fucking ecstatic to be proven wrong but sadly I believe I'm correct.

Yes, VS is free for individual devs, and for five users in a small business. Does it matter though? If you're too cheap to pay for developer tools, you're probably a terrible place to work at.

Yeah it's pretty important if you're at such a terrible place to work at, because you can make that place a little less terrible, and because you can use the C# experience you garner to get into a less terrible job.

Re: The Case for C# and .NET

#147
post #5

> For the front-end, JavaScript is unavoidable (for now) Author really needs to give Blazor a try. I wrote some comments last week speculating that I'd use Dart or TypeScript with C# .NET on the client because WebAssembly doesn't do DOM manipulation, but turns out I should have waited to learn it better before making a comment. I've learned I can add events and event handlers to elements without ever leaving C#. Then…

Have you actually tried Blazor ? Just the schism between WASM and Server and the feature matrix there, and generally shit quality of early stage Microsoft product - I wouldn't touch it with a 10 foot pole, likewise for MAUI - I've seen coworkers prototype both for some greenfield projects in last month or two and both projects gave up on it because it just isn't there yet for mainstream development. I mean .NET core…

I've tried Blazor. I built and deployed 3 apps for clients over the last 3 years while consulting and was able to deliver the projects for 33% what it would have cost to deliver them with react or angular.

Clients have been very happy with the results.

Then I built my own startup with it, and we have a solution that 3 devs have been working on for 2 years.

I can't recommend Blazor enough. I love it.

I have run into a fuck ton of problems with MAUI though. It's a fucking dumpster fire of a technology.

* Blazor server side I have very limited experience with client side.

Re: The Case for C# and .NET

#148
post #121
post #5

> For the front-end, JavaScript is unavoidable (for now) Author really needs to give Blazor a try. I wrote some comments last week speculating that I'd use Dart or TypeScript with C# .NET on the client because WebAssembly doesn't do DOM manipulation, but turns out I should have waited to learn it better before making a comment. I've learned I can add events and event handlers to elements without ever leaving C#. Then…

Man, I tried out Blazor over the last few days. I really wanted to love it (I love C#), and it looks like it might be good one day, but I found it sadly lacking. I couldn't even add a mouse event to a canvas element. I had to install an extension package to even use a canvas (BECanvas), and then that extension package didn't even have mouse events. I have to say, thats so absurdly basic of a thing to be missing that…

Anything with canvas, or a very interactive experience I think Blazor is a bad fit for. I'd do just straight JavaScript or typescript.

But so much of the world is user clicks a button, run server side code, update html, and blazor is an amazing fit for that.

Like I'd never build a Google sheets, Microsoft word, or outlook replacement in Blazor.

But I'd totally build a hub spot, Salesforce, Facebook, reddit or hacker news clone with it.

Re: The Case for C# and .NET

#149

This thread shows there is still a large amount of FUD around .NET and it’s community. Folks here still think it’s Windows-only and comparable to Java. Yet latest TechEmpower benchmarks shows .net running on Linux and being faster than Go, Python, Node, and Rust.

Coming from Java, Go, and Javascript, C#/.net just plain sucks. Things that should be simple, e.g. Collections APIs.. aren't. I stopped trying after this realization.

I preferred the C# from 15 years ago compared to whatever is going on over there at present. If you're already indoctrinated into the ecosystem, I'm sure it's fine. Otherwise, buckle up - things are going to get choppy.

Post reply on HN