314 points · by greenSunglass · 4y ago · 371 comments
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 on macOS). Even systems programming and AOT is doable or full featured static deployment is possible integrating a small runtime into a single binary.
And boy is .NET fast...
This facts made Golang pretty interesting to me, but what I did not like here is the lack of a usable cross platform Plugin-Loader technology, most of the stuff has to be monolithic, then the module management and some of the missing concepts (like generics, which is also now available in go).
The sheer amount of concepts in C# is overwhelming (from basics like Generics to less common ones like Extension-Methods, operator overloading, etc.).
I don't like Visual Studio as IDE, but VS Code is an acceptable alternative tool, although I personally prefer the non-free JetBrains Rider.
Nuget package manager also has it's caveats, e.g. that the official repo can only "unlist" packages, not delete them or that the publish times sometimes have horrible delays, but that's also still acceptable, since you can use the github package registry or bring your own to overcome these issues.
Technologies on my todo list include getting into MAUI (a cross platform UI stack) combined with Blazor[1], which can use Web Components in native UI apps and develop TRULY cross platform (Web, Desktop AND Mobile with the same codebase). Like electron, but without the browser dependency due to native integration.
Although everything is tied pretty tight to Microsoft, there is a huge open source community developing cross platform libraries, that are easy to use. Even though i find that microsoft has often made strange decisions in the past, the current state is clearly a recommendation to have a look.
It's sad that the time saved with Visual Studio's hot reload alone seems to outweigh the (massive) performance gains from using Rider, given that I have to restart VS from its memory leaks multiple times a day or it will slow to a crawl. Omnisharp isn't performant or reliable enough for daily use, either. The current state of .NET tooling leaves me unsatisfied.
https://docs.microsoft.com/en-us/dotnet/core/tools/telemetry
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...
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.
Instead, dotnet CLI + VS Codes find+replace does a very good job at managing dependencies. It has never been a pain and on project build, all imported version will be consolidated to a single one anyway.
I've used Visual Studio for 20 years now, and while the tooling has come a long way, I'm starting to feel like MS and the community are abandoning it for VS Code. I don't mind VS code, but unfortunately the stack I'm working in (Dynamics 365) requires plugins for Visual Studio that tend to lag behind the release cycle of Visual Studio versions by a few years. I use Rider for .net core projects on my mac and it's fantastic.
In fact my biggest criticism of my day to day job is Microsoft's support for this incredibly enterprisey framework I have to work in.
I see they move in VSCode direction with tools like Power Platform CLI [1], power platform tools extension [2]. PCF (PowerAps Component framework) enabling to develop UI components in frontend framework-of-choice... however none of that is available (yet?) for On-Premise deployment so we're 2nd class citizens. Because of that, haven't been able to play with this and try out so don't know how far that tooling goes.
As a platform, I really like it. Sane, consistent (except some very early stuff there), the backend extensibility - thumbs up for that.
[1] https://docs.microsoft.com/en-us/power-platform/developer/cl...
[2] https://marketplace.visualstudio.com/items?itemName=microsof...
Agreed. But F# is one of the best designed languages around.
If you open a C# project in VS Code when the "Ionide" extension (basically the F# extension for VS Code) is installed then the extension thinks it's a F# project and will open some F# stuff after a few seconds (or prompt you to setup some F# stuff in its gitignore). The root cause has been identified (plugin activates when it sees a ".sln" file), a PR has been opened and rejected with no mention as to why (https://github.com/ionide/ionide-vscode-fsharp/pull/1401) and the developers behind it are frustratingly non-communicative about it, closing issues about it (https://github.com/ionide/ionide-vscode-fsharp/issues/1701), they're not present in the discussion (https://github.com/ionide/ionide-vscode-fsharp/discussions/1...). Usual rules about OSS maintainers apply, they don't technically owe us users anything, we should be patient and respectful etc ... but man it is truly bizarre to be ignored or ghosted like this.
For the Ionide stuff, I agree. I don't use it, even though I use Visual Studio Code for other languages, and am happy enough with Visual Studio on Windows and Visual Studio for Mac on macOS.
It's to avoid the npm left-pad problem. nuget.org packages are idempotent.
For the publish times, I found out you can cut it in more than half if you tell nuget to ignore caches.
Draft releases would be awesome.
You can use your own private repos like MyGet[1] or Github Packages [2].
1. https://www.myget.org/ 2. https://docs.github.com/en/packages/working-with-a-github-pa...
It was perfect and exactly what I wanted. I had experience with XAML and MVVM thanks to Silverlight and WPF, so that explains at least some of why it was such a breeze. But it is way nicer than coding for the web, and I've done my fair share of that.
I was able to port over most of the code to MAUI easily, except for the missing controls. But MAUI is very exciting overall, and I look forward to using it more. After a map control is released I will fully port my app.
I switched back to node.js with fastify and wrote my app in an hour.
I really like C# for cli and windows desktop applications, but I probably won’t touch it for the web in the next few years.
The issues you had could be attacked by navigating through this section of documentation, diving into the tutorial referenced in the beginning of the Overview section and the subsequent sections: https://docs.microsoft.com/en-us/aspnet/core/web-api/?view=a.... This is not necessarily in defense of c# and dotnet, but this reads like you barely spent any time trying to digest the documentation.
Then once you need to go beyond the standard libraries it becomes a nightmare to deal with. In some cases, like extending the AD libraries, it’s sort of easy to extend classes with methods but the documentation on how to do so tends to assume a lot of domain knowledge. In other cases like if EF’s standard functionality isn’t enough for you, or you need to deal with weirdly formatted XML or non standard SOAP requests (don’t ask) it can be such a nightmare that it’s sometimes easier to write a micro-service in another language to do the “translation”.
I think it speaks of a language that doesn’t see too much use by its own creators. I may be wrong on that, but having build a lot of things for Azure, Typescript has often felt more like a first class citizen than C#. Obviously not for everything, far from it, but sometimes and those sometimes are enough to make C# troublesome because unlike things like typescript that are great second class citizens in the Microsoft ecosystem, C# isn’t. It either fits really well or you have to fight it.
And it says right at the bottom, that OpenAPI and model binding is not supported in their route to code feature.
I initially googled how to create a simple json api, and that’s the documentation which I found. Looks really easy in the beginning, but after you’re done with your routes, you’ll read at the end of the documentation, that OpenAPI generation, model binding etc is not supported. I blame that the guide‘s title is misleading and - of course - that I should’ve read till the end before actually following any step of that tutorial.
For example, the secret incantations required to output a mere string as raw json mimetype or log incoming deserialization errors* are unintuitive and very labourious - see InvalidModelStateResponseFactory. Or that I had to create a custom output formatter to output raw json. Why? Sometimes I just want ASP.NET to get out of my way and it's not trivial to tell it to let go.
* For example, url?parameter=1 for a boolean parameter, which would have worked with .NET Framework but won't for .NET Core/.NET.
As per another comment after having seen JS devs switch to F# for very large professional application and not wanting to go back I feel its fine for web. YMMV.
If you use the templates provided by .NET Command Line Interface or Visual Studio, you'll get this all baked in & setup.
VS also added a very nice feature where it suggests & imports popular packages if you type a method on a type that's well known. If you already have it added to your project but need a using statement in this file, it'll pick that up fast as well.
They've also improved their docs quite a bit from years ago with lots of good examples for common things.
https://docs.microsoft.com/en-us/aspnet/core/web-api/route-t...
That said, you may take a look at my small very early state pet project `tonehub`[1], which can be seen as pretty modern CRUD Web API in 2022, utilizing swashbuckle for OpenAPI, JsonApiDotNet for CRUD, Entity Framework 6 for Database, HostedServices for background tasks and some other nice concepts (DI / IoC, Options Pattern, FileStreams, etc.). I could also use SignalR for WebSockets / Realtime, integrated OpenID/OAUTH2 Authentication, FluentValidation for validation, Api Versioning and much more.
I've never accompilished something like this with this small amount of code...
Failing to find the differences between them will impede learning in general.
With .NET 6 SDK, 'dotnet new webapi' will give you a template project that does everything you listed save for extended validation logic which you can easily add with 'FluentValidation'.
In addition, to run ASP.NET Core nowadays you only need:
var builder = WebApplication.CreateBuilder();
var app = builder.Build();
app.MapGet("/posts/{name}", ([FromRoute] string name) => /* controller logic, classes will be serialized as JSON */);
await app.RunAsync("http://localhost:8080"); dotnet new webapi -minimal
This will scaffold a project which is more or less the exact same as Flask, Express, or any other "easy" framework.OpenAPI output is built-in, but tooling for development does require a bit of knowledge (agree that Microsoft would benefit from making this work out of the box).
A small repo here showing how to connect OpenAPI and front-end TypeScript client generation: https://github.com/CharlieDigital/dotnet6-openapi
services.AddSwaggerGen();
app.UseSwagger();
app.UseSwaggerUI();
They are existent and good.
Of course you did. You're on familiar ground.
Personally I'm also familiar with .Net and could do the same in that stack in that timeframe too. Like with many things worth doing, it requires a time investment to reach that point.
Having said that, .Net APIs support JSON request/response out of the box, validation is available on the models in seconds using a powerful set of attribute annotations, and Swagger is also built in out of the box. And API projects can seem similar to MVC ones as they use the same framework and libraries, but whilst the out of the box APIs have controllers they don't have views.
So to repeat, it's down to familiarity.
Edit: For clarity this is not a criticism. I fully understand why these things may not be obvious up front. Both the validation attributes and the Swagger URL for the default support are not obvious to the newcomer.
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.
The part that keeps me hooked is the fact that I can stand up something capable of producing those numbers in 30 lines of code using 1st party dependencies only. I can then have a full prototype to demo by late afternoon, again having antagonized over exactly zero 3rd parties.
For me, the performance numbers aren’t just about speed while in production. It’s also about speed to production. Having the confidence that it’s almost certainly going to be fast enough by default keeps me from worrying about optimizing random bullshit throughout.
I still haven’t seen anything that comes remotely close to the combination of speed and stability offered here. I do some pretty nasty things with the runtime and it just copes. GC seems like pure magic now too. I continue to avoid things like LOH allocations with streams, but I don’t worry about it like I used to in the 4.x days.
I like Rails (vintage, Rails 5). Unfortunately DotNet and EF combined now have virtually the same productivity but with massively better performance. Which is a shame as Ruby is a great language.
A language can't be the fastest at everything in today's mature language ecosystem. OTOH, Debian's "Programming Language Games" benchmarks shows it's on par with Java (which is not slow in any means), and not as fast as you claim [0].
In the page I shared, some C# benchmarks are impressively fast, because they are written with explicit hand crafted SSE3/AVX vectors, which a run of the mill programmer won't want to touch (for most of the time, anyway).
Comparing .NET Core, which is a hybrid JIT language with purely interpreted ones like NodeJS and Python also makes no sense at all, considering Python Compiler does not do any optimizations whatsoever, and is still confined to a single core per process unless you pull some tricks.
Choosing horses for courses is fine, and we all shall do it, but claiming a language as winner over a single benchmark suite, including the one I referenced is wrong.
Choose what works best for you.
[0]: https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
What's so good about MS ranking in the TechEmpower benchmarks is that it's the fastest full-featured "enterprise" framework. Frameworks like drogon or just-js are impressive feats of engineering, but the only reason they exist is so that their authors can mention that on their resume. If you run them in production, you are on your own.
There's equally fast Vert.x, which you can buy support from Red Hat for, but most Java shops use Spring Boot (vmware or Red Hat support available), which is easier, but hopelessly slow in comparison.
That proves my point even further, because I don't develop anything remotely web-related, hence that performance scenario is completely moot for me.
> What's so good about MS ranking in the TechEmpower benchmarks is that it's the fastest full-featured "enterprise" framework.
Again, the same because the software I develop is not "Enterprise" either.
What I develop is scientific software, and needs to be extremely performant. In my case C++ is the best language, but it's not the best for every case. This is why I also learn Go and use Python for other tasks.
In my case, Debian's benchmarks are directly related to my use cases, however even that's not a definitive measurement for my case. It's just a bunch of data to keep in mind.
It's not only their stance against Linux only, but everything competing with them.
I believe hardware and software should be open and platforms shall compete openly. I don't use any vendor which openly kills this interoperability and try to corner market with underhanded tactics.
It's not limited to Microsoft, though. I use Java because there's OpenJDK, Go because there's gcc-go toolchain, etc. Similarly I don't use Rust because it's LLVM only for now.
However, this doesn't mean that I want these to disappear. I want them to compete fairly, so we can improve. I'm not a web-dev so I have no need for this frameworks, but I'd make similar choices if I enter to that arena, too.
They are still running this strategy, but now also buy good PR buying paying high profile developers thru their developer advocate positions.
""" Microsoft finally is fulfilling its dream of EEE to Linux. Windows Subsystem for Linux (WSL) embraced the API – letting you run Linux binaries (and GUIs!) on Windows natively. Next, WSL extended the kernel with GPU driver support. "" " - https://matt-rickard.com/embrace-extend-extinguish/
Thanks for reminding, BTW. :)
Java and C# are very similar languages.
That's not true atm.
At time of writing (TechEmpower 21) Rust frameworks have top 3 out ouf 5 slots (#2, #3 and #5) in composite rankings. https://www.techempower.com/benchmarks/#section=data-r21&tes...
Which goes to show, benchmarks change and depend on use case. And Rust is very competitive (in league with C/C++).
I don't get this. If you want to write C#, write C#. If you want to write Go, just write Go.
Go is a great language because of its simplicity and ecosystem, has lots of useful things in the standard library, has pretty good runtime performance and also compiles to static executables easily (which is especially useful for projects like Nomad). It's both a good fit for web development, as well as writing smaller or larger utilities. Honestly, its packaging situation is leaps and bounds ahead of something like Python, so I predict great future for it in DevOps too.
C# is a more advanced language with a rich history and a lot of the functionality for web development in particular coming as first party packages. Some of that historical baggage weighs it down and the complexity can be annoying, but ASP.NET Core, EF Core, Kestrel and many other components are great. Plus, running on *nix is good, even though the single executable/runtime/deployment situation isn't quite as easy as with Go.
Write code in whatever technologies work for you. My caveat to add would be that I'd (almost) always develop front end and back end separately, since the React/Angular/Vue webapp really shouldn't care much about what technologies are behind the APIs. Of course, being able to use a single language for both FE and BE development is also a worthwhile approach!
That’s because my argument has nothing to do with the language itself but you still felt compelled to write an essay. I’m saying the modern Linux-based tooling, ecosystem, and devex of C# is inferior to so many other choices.
https://news.ycombinator.com/reply?id=32220935&goto=item%3Fi...
(Also the benchmarks are a cheat, look at the source code of C# vs the source code of Go or Java)
I also thought their benchmark is a cheat. But it is not. It is testing exactly what the benchmark was testing in that scenario. That is why TechEmpower Benchmark suite is so powerful. It uses different web server scenarios (connection, JSON parsing, database connections, ...). The different test case implementation .NET and others have are making sure no other factor is influencing this. For example: when you benchmark connections why dealing with MVC, validation and database connections.
It is not .NET who cheats, it is the others who do not properly isolate the tested performance aspect.
And to make the comparison a bit more real and day-to-day applicable, you need to pick the right framework configuration (like aspcore-mw @ 80% / aspcore-mvc @ 37%) and compare with other reasonable scenarios (like express @ 1% / spring @ 2% / quarkus @ 8%). Both are then far of the top 10 ten list but still comparable. The top 10 combinations are for cases where developer productivity does not matter but throughput is the key (e.g. a DoH resolver or a system like a Cache / Database).
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.
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 when I need to use a JavaScript library, I can load it just in time for my component. Once I got the hang of it I really felt like I've found the sweet spot for front end development.
Blazor is in development and will only get better. I believe it will eventually be recognized for what it is, but it's still early.
I mean .NET core was pretty much in this boat pre v3, it took them years to move past the .NET standard mess, Xamarin never cleaned up and they are hoping MAUI will eventually just sweep it under the rug.
I wouldn't bet on any Microsoft stack that hasn't had 3+ years of successful use in the wild - I've been burned too many times. You might say the same is true for any other project/stack - but even when they moved to OSS .NET projects have this Microsoft level of complexity and boilerplate that makes diagnosing trivial things a slog. And Microsoft likes to put "stable" label on a lot of things these days with the pressure to ship. Good rule of thumb - not worth my time until v3.
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.
Or at least those were my findings last time I tried. I would be very happy if that isn't the case currently.
For intranet web apps it looks amazing though.
That’s a pretty extraordinary claim.
I know single stack can be more productive, but that sounds very impressive. Could you perhaps talk details of:
- styling blazor (eg. Bootstrap, tailwind); is it just drop in? How do you use it, eg. Without the tailwind preprocessor npm package?
- interactive front end components (eg drag and drop) that lag badly when using SS blazor in examples.
- bridging to native js (which is ultimately unavoidable in situations where you need integration like maps as far as I know)
- scaling load on concurrent users (one ws per user right? Are you using the signalr service & functions? I tried this and found the long running azure functions are quite expensive to run. Do you have advice?
That's part of my problem with it - from what I see they are pushing two independent tech stacks (WASM and dynamic server rendering/JS updates) under the same name - but the APIs underneath and the architecture is very different.
Yes. Server-side Blazor is incredibly productive and fantastic for complex UIs, especially for B2B and other SaaS products.
How good can it get though? Blazor WASM suffers from the huge initial, multi-megabyte download of the .NET runtime. How is that expected to come down to something in the range of 50-500kb what we have with most JS frameworks now? I just cannot do that on public-facing parts of an application. It is unusable when accessed from a slow mobile network. Company-internal stuff sure, who cares.
I really wanted to love Blazor, and evaluated replacing some of the complex frontend UIs at work which are a JS nightmare with either Blazor Serverside or WASM. But serverside seems like an afterthought to me. I recently learned about Phoenix Liveview here on HN, and according to what I read, it seems like a much better option if you want that server-side rendering stream model. With Blazor-server, I get the feeling it is only a makeshift-solution until WASM takes off, and that makes me even more reluctant to use it.
As far server-side Blazor - it seems like an afterthought because you read about Phoenix Liveview? How is that a serious evaluation? Blazor is a core part of the framework now and the server-side model is always going to be a serious option because it enables functionality that can be done with the disconnected client/WASM mode (like direct DB access without the serialization + API overhead).
I suspect you're talking about full apps that include third party deps. The majority of SPAs are < 1MB unzipped and <150KB zipped. Source:
https://gist.github.com/Restuta/cda69e50a853aa64912d
You can't look at some site that has 10MB of third party deps and compare that to what Blazor is doing. You'll still need third party deps with Blazor as well.
The sites that have a large 10MB bundle would have had 100's of 100KB scripts pre-spa days.
The biggest way server side fucked us was originally db contexts are bound to scope via IOC in asp.net similar to MVC or razor pages.
Which is fine when your scope is a single request, but when the scope is a circuit you get so many weird fucking errors. We worked around this by disabling tracking. But the right fix is we should have used factories, but we didn't figure this out until it was too late and we had written a fuck ton of code.
This is such an obvious issue and should have been in the docs but wasn't.
But other than that it seemed fined.
Due to cache partioning in browsers now, this will still be a big issue for all clients. Don't also forget that many clients are in poor internet speed zones.
A 2MB "buy in" will be unacceptably high for lots of projects (but not all, obviously).
The thing is, Blazor will become the lingua franca of (web) UI development for bigcorps, so I just need to suck it up and learn it (I'm a .NET consultant geared towards finance & insurance)
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.
I tried Blazor. We used it for one mission critical project.
We found that the development cycle is too long and it has too much friction compared to Node for front-end development.
Back to Node for frontend (Vue)!
This will allow people to write competing frontend frameworks, or mix and match their JS framework of choice while calling into .NET app logic.
The latter already possible, though a bit hacky with the official tooling at the moment, since Mono can compile regular .NET code to WASM no problem (a fact already extensively used by game engines like Godot or Unity).
I call that bureaucratic software because it reminds me of doing taxes. It's put me off from trying a lot of Microsoft tools, but with Blazor I decided to push through the pain. Once I did, I could see the logic of it and it became less of an annoyance
Here's a small gist where I use fable-py to use the python prettymaps project that was posted a week ago on HN: https://gist.github.com/Banashek/1cc3d8435843bcff230906fb037...
The issue that I have is since it is a thin-client re-deploys kick everyone off immediately. Where the web is totally stateless this is 100% state full. I'm used to being able to deploy production fixes rapidly without disturbing anyone's work but with Blazor server that's impossible. I've started to look into load-balancing solutions or something but not being able to roll out fixes throughout the day is almost a deal breaker for me.
This person was able to get it from 14.4MB to 4.4MB: https://www.michielpost.nl/posts/reducing-blazor-webassembly...
Whether that's acceptable is up for debate but it is in line with most SPAs/websites these days.
Then there is a Redux-like option and.. No thanks :D
The browsy bits might not work without a server (not sure), but the documents themselves are markdown.
I agree. This appears more like an attempt to get the most value (integration of proprietary Visual Studio features that devs want) into the VSCode extension as quickly as possible.
Said proprietary libraries are likely not able to be easily open sourced for a variety of possible reasons, so a closed source LSP bridge was the compromise the teams came to.
It's not without controversy on the Python side as well.
At some point it simply becomes questions of stewardship and transparency: How good are they at pointing out the open source parts wrapped inside the closed source LSP bridge? What cadence do they upstream fixes to the open source parts?
So far Microsoft's stewardship on the Python side seems strong: pylance has a lot of transparent documentation of all the open source bits. There seems to be a steady upstream flow to pyright for users that prefer to stay entirely with an open source LSP. Microsoft isn't treating it like a competition to "win" and encourages users to make their own choice among the options.
Of course, Microsoft doesn't "own" Python in the same way it "owns" .NET so I can definitely understand why there's increased fear that Microsoft won't be as good of a steward with respect to this "competition" with OmniSharp simply because of .NET's past. But in .NET's past this controversy would be happening after Microsoft did all the work in building the closed source LSP replacement. The fact that we're having this discussion now in only an "architectural discussion" state says a lot already about how Microsoft's stewardship and transparency have changed today.
ALso, JetBrains' IDEs are:
- free for students, startups and opensource projects
- cost an insane "two/three beers a month" for individual licenses (yeah, it's more expensive than two beers in many countries, but as a developer I could easily afford it even in the shithole that is Moldova)
I tried VS Code and couldn't get used to it. So now I use Rider for C# and Webstorm for JS. Sometimes I open Visual Studio, though:
> There are some custom plugins someone in my org wrote that help accomplish some team-specific tasks > When I need to work on stored procedures in our SQL databases. Rider doesn't know how to parse the schema from the sql project files, instead it wants me to connect to a live database or it will color everything with little red underlines and give me no autocomplete
I think it's nice that my employer is willing to pay for my Jetbrains licenses despite the fact that it is selling a proprietary competitor and also simultaneously pushing an open source alternative. I appreciate it.
VSCode with the C# extension is the preferred C# development environment of corporate shadow IT.
Edit: I love vscode for c#
Sounds like a pretty good reason to me?
I understand that 90% of Kotlin's audience is mobile devs and server-side Kotlin is rare, but as a .NET developer, a few years ago I did a small production Spring Boot webservice in Kotlin and the experience was really good.
In my view Python and Ruby are not natural competitors to C# as they are dynamically typed and (in Python's case) interpreted. Similarly Rust, C, and C++ are not natural competitors to C# as they do not have a GC. Java, C# and Go, on the other hand, are pretty similar.
Maybe you have some legacy codebase in C# that you need to leverage.
All other reasons to chose C# over something else for web applications seem to lack evidence but certainly not conviction. So yes, Python is a direct competitor to C#, as in there are many more Python web projects out there than C# ASP.net ones.
Oh please please please let this come true so I can write c# on the backend again. I love typescript because it made JavaScript (i.e. front end web) so much less shit to work on, and I’d prefer it over ruby or python backends still, but c# hits such a sweet spot of ease to write, while still remaining relatively performant.
Go and rust are probably better for certain applications, but c# would be light years ahead of things like ruby or python.
It's the very definition of blog spam.
The tables and graphs in "The Performance Problem" section should at least feel a little strange. Looking at the original article[1], we can see the source code for JavaScript [2], Python [3], and .Net [4] shows that...there just isn't much going on here. This isn't a comparison of how fast these are. It's a comparison of how fast this AWS setup could do its thing, and how fast this DynamoDB client library is.
In the "So Why/Not .NET?", there's the "Advisories by package ecosystem and severity"[5] graph. So it doesn't feel a little strange that NuGet is the pinnacle of software engineering, and programs there just have no security vulnerabilities? Or maybe...there's some bias going on here, and NuGet isn't as interesting to look at as PyPI, so there are fewer advisories being published? That's another way to look at it.
When things look too good to be true, maybe they are. I don't care if the author (or anyone else) wants to use .Net, have fun. I do care that we sometimes approach technological issues with hostility and rivalry, accepting random data which seem to support us without looking them through.
[1] https://filia-aleks.medium.com/aws-lambda-battle-2021-perfor... [2] https://github.com/Aleksandr-Filichkin/aws-lambda-runtimes-p... [3] https://github.com/Aleksandr-Filichkin/aws-lambda-runtimes-p... [4] https://github.com/Aleksandr-Filichkin/aws-lambda-runtimes-p... [5] https://octoverse.github.com/static/github-octoverse-2020-se...
I submit for the record:
- Apollo Client: https://github.com/apollographql/apollo-client/blob/main/src...
- Storybook: https://github.com/storybookjs/storybook/blob/next/lib/chann...
- Nest: https://github.com/nestjs/nest/blob/master/packages/core/nes...
- MongoDB Driver: https://github.com/mongodb/node-mongodb-native/blob/main/src...
- Prisma: https://github.com/prisma/prisma/blob/main/packages/engine-c...
I got sleepy just reading this. There's just so much fragmentation and frameworks and different versions of frameworks and web-servers... can't Microsoft just let the .NET be and let them do their thing? They have certainly pumped out loads of amazing software that seemed to get a knee on the guts by higher management.
Mono is a cross-platform (ish) implementation of .NET Framework, but its future is (eventually) to be replaced with the main .NET which is now based on the cross-platform version (.NET 5 and above, which is currently distinguished from Framework by continuing to call it ".NET Core"). Mono and .NET Framework will fade away once Unity gets their act together and moves on from it.
tl;dr: .NET 5 and above are, for all intents and purposes, the only future path for .NET, but we're in a transitionary period right now.
For ASP.NET there is nothing Windows-specific in there I've noticed.
- If you're starting from scratch all you need to know is that you should use DotNet 6+ and you'll be on the mainstream track with full cross-platform support.
- Nothing is Windows-specific unless you're actually wanting to target Windows stuff specifically.
- If you're doing desktop dev MAUI is the way forward, but personally I don't trust Microsoft with desktop stuff any more (too much switching and deprecation over the years).
There's some issues if you need to use an older version of ASP.NET and whether or not it has "Core" in the name, but after .NET 5 and ASP.NET 6 there's no longer that fork to confuse things and it's back to much simpler version numbers/checks and no longer needing to worry about the word "Core".
Windows -> Linux
WSL -> Linux
WSL2 -> Linux (Its real Linux)
macOS -> Linux
All of the scenarios were deployed to AWS.
I'm not entirely sold on its use for desktop GUI development yet (will watch MAUI closely) but I am eager to jump into Blazor and see if I can start to remove JavaScript from my stack.
At least from the perspective of recruiting in Australia.
Python is on the way up and third most popular but well behind C# and TypeScript.
Golang is on the way up but very small in terms of number of developers.
Java is on the way down but will never vanish, it's just not super popular any more.
Ruby is small enough to just be a footnote.
There's lots of other languages that make up the long tail.
The message is that if recruiting matters then you should be using C# and TypeScript.
TIOBE has C# much larger than Go and growing, and it also has Go slightly shrinking over the past year.
https://www.tiobe.com/tiobe-index/
Same results on Stackoverflow https://insights.stackoverflow.com/survey/2021
Same results on IEEE Spectrum https://spectrum.ieee.org/top-programming-languages/
Same for PYPL https://pypl.github.io/PYPL.html
I cannot find a single place that looks at a large dataset and a decent number of languages that gives the result you claim.
Care to list where you got your data to support this claim?
SQL - 11,425 jobs
Java - 7,390 jobs
Python - 6,777 jobs
C# - 4,995 jobs
JavaScript - 4,208 jobs
TypeScript - 758 jobs
Ruby - 252 jobs
Golang - 206 jobslolwut. TypeScript is niche compared to Python.
The ecosystem deserves mention. There are some high-quality libraries that work well, even if they aren't the most popular. Take objectional relational mappers, for instance. You can go whole hog and have an ultra-coupled, er, cough, "batteries-included" ORM much like every other ecosystem, or experiment with a multitude of options between writing your own SQL but letting the ORM handle hydration, and a full-blown ORM.
Tooling support has always been top of the line, too. It is only in the past few years that other languages have caught up with the quality there (Eclipse/IntelliJ excepted).
I somewhat disagree about the aspirations. Have you tried out things like switch expressions and LINQ? You can apply functional concepts almost everywhere these days. Complex state machines can be modeled using 100% functional techniques.
love this typo.
will use objectionable-relational mappers from now on.
- objectionable - adjective, arousing distaste or opposition; unpleasant or offensive (definition source: Oxford Languages)
And not comparing ASP.net to more mature web frameworks is also a strange choice. At the very least, you need very capable developers not to shoot yourself in the food with the enterprisy dependency injection magic. In my opinion much more so than with other frameworks. I mean, if you have a steady supply of highly-qualified dotnet engineers, go for it...
I think C# would benefit from a Result/Option addition.
Exceptions are here to stay though. I don't see how you could retrofit something like Rust's Result on top of .Net. (Also, .Net has a pattern that's an alternative to exceptions: `bool TrySomething(out T result)`. But it's quite limited, in several ways.)
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.
YMMV - maybe you've been especially unlucky.
If Typescript makes Javascript so much work because the tooling discourages learning best practices, how does moving to C#, which is designed very similarly, help?
I.e. if half the cardinal sin was creating Typescript in the first place and that's part of why Javascript sucks so bad (I am inclined to agree, FWIW), how does C# then make it better?
Author is light on the details here. I do agree that strong typing systems, safety checks are preferably on backend systems-grade code, at least, but I don't think C#'s types are strong enough, for that prefer something like a Haskell-ish language, Cayenne e.g., Ada, and with strong code-re-usability. I decline to champion a particular language, I only know C# has a lot of baggage from Java/Typescript/Javascript, which it would be better without (C# is also starting to suffer from a C++-ish problem, where there are so many new and different ways to do the same thing that interoperability and "good" standards are swiftly becoming a problem).
If Microsoft would only clearly and trustworthy communicate.
Nothing is as universal as typescript / JavaScript. Unlike other languages you also don’t have to context change when you’re transitioning from working on the backend to the front end. Everything also tends to be rewritten for node eventually.
Without JetBrains Rider .NET would have no cross platform dev experience.
VS is shitty Windows bloatware, VS for Mac is utter rubbish and OmniSharp was killed by Microsoft because they didn't fancy to give away dev tools for free and purposefully killed it in order to replace OmniSharp with a closed source extension, which as of today doesn't exist yet. So if you are a Linux developer then you are basically fucked today if you wanted to use .NET, except there is Rider. Without Rider .NET would be completely unattractive today.
If one is okay with this then .NET is amazing. Otherwise I cannot advocate for .NET anymore I am afraid. Microsoft doesn't see what's good for them. VS Code is the future, not VS. They invest too much time and money and marketing in selling VS to developers instead of making VS Code a great free OSS experience.
They head of the dev division needs to protect the revenue. Simple as that.
However, I completely agree with your sentiment: "Microsoft doesn't see what's good for them" ... because "free" is not "open source" and trust does not come from "free" but from "open source".
Though of course in retrospect it does depend upon which workloads you're working on - and I mostly do command line tooling, web apps, and APIs, none of which require a design surface so maybe that's why my opinion differs as I've no informed idea how good/bad the layout aspect is.
Language isn't important unless it is business critical. And successful businesses are scarce.
Being able to write a validation schema and deriving types from it automatically - that I can share on client and server - is just too big an advantage.
Similar in F# land is https://github.com/Zaid-Ajaj/Fable.Remoting While both client and server are designed to be used from F#, they should be able to be used from js/ts as well as c# if desired, though I have not tested that.
The only built-in way to type a sharp outside wordpad is to have a special registry key set then hold alt and type +266F, isn't it? That sounds to me like it falls under "dreadful support for Unicode".
I like F# too, but I'll stick with one of it's non-MS controlled alternatives.
Also keep in mind that .NET Core is not only open source, but comes with complete protection from any patents Microsoft might have. The only thing Microsoft can sue people over is the .NET Core trademark itself.
I also use Rider exclusively and going to Visual Studio on Windows now and then I'm not missing much (visual studio did have some nice plugin for debugging compiler plugins, had to hack around than in Rider)
I can't comment on Unity part.
F# for me overpromises and underdelivers - it all sounds amazing in theory but it's been 3 times over the last decade where I've tried to use it (last time just a few months ago) and it never just works - I've spent diagnosing "why isn't this F# feature working as advertised" than solving my problem (from tooling like F# projects breaking autocomplete in VS solution - even for C# projects, to language features like type providers just being a nightmare to work with and integrate into CI/CD)
My observation is that the ex JS/Ruby/etc devs learning curve's seem to favor F# over C# as it is more like these languages. There's just a lot less to learn, and the coding style (e.g. modules, function first, etc) is more synonymous with langs like JS than heavy OO languages. I've recently inherited a team that moved to .NET from JS, and getting them to try C# has been painful especially when using things like ASP.NET. There's a lot of knowledge I just took for granted - we don't realise how much knowledge is required to use standard Java/C# OO in a production like setting that many dev's stumbled on when they were junior but have long forgotten the learning curve they went through. They tend to be framework heavy/dependent and require much more experience. From patterns (what's a strategy, repository, etc etc), to dep injection frameworks, to which refactoring tools I need, etc, etc - where in F# in my recent experience the experience is more, but still not quite "just code and work it out as you go".
The pit of success favors F# over C# in my experience with these teams especially if you keep it simple with the features used.
My experience has been that F# appeals to coders who are using the .NET platform coming from languages like JS/Go/etc but also has static typing who usually at least in the jobs I've been in are often on a Mac. C# dev's typically come from Java/C# enterprise kind of shops. Not one is better than the other and I will work in whatever space has interesting problems to solve - I think the difference is more cultural than technical.