15 ms·
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 f
by sandreas 4y ago
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 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.
https://www.youtube.com/watch?v=2eIsQ3Pm2bE https://www.youtube.com/watch?v=2eIsQ3Pm2bE
- mccorrinall 4y agoI 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 really like C# for cli and windows desktop applications, but I probably won’t touch it for the web in the next few years.
- GiorgioG 4y agoValidation and Swagger/OpenAPI have been available for a long time and well documented. I don't know what resources you used to learn ASP.NET, but they failed you.
- mccorrinall 4y agoLooks like I was using the wrong ASP.NET features! Route-to-code does not support OpenAPI. https://docs.microsoft.com/en-us/aspnet/core/web-api/route-to-code?view=aspnetcore-6.0 https://docs.microsoft.com/en-us/aspnet/core/web-api/route-t...
- pjmlp 4y agoAll the way back to .NET Framework 4.5 at very least (2012).
- lucidone 4y agoFluentValidation and Swashbuckle are two great libraries for the tasks you referenced. This is a good enough reference repository should your curiosity be piqued again in the future: https://github.com/jasontaylordev/CleanArchitecture https://github.com/jasontaylordev/CleanArchitecture
- SideburnsOfDoom 4y agoYep. The problem that the parent commenter had is distinguishing between "Not existent" i.e. the tool that I am trying out sucks; and "I don't know how to use this tool yet" - a completely normal part of the learning experience. Failing to find the differences between them will impede learning in general.
- simooooo 4y agoYou don’t need to use MVC either since minimal APIs are a thing now
- phito 4y agoThe issue here is that you didn't know what you were doing (which is completely normal when trying a new language)
- bmitc 4y ago> The sheer amount of concepts in C# is overwhelming Agreed. But F# is one of the best designed languages around.
- smcl 4y agoI don't disagree, and I love F# but I think it owes a lot of that to OCaml. That said, since we're talking about C#, F# and VS Code I'm gonna vent a little about something that arises when you use all three :D 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 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 https://github.com/ionide/ionide-vscode-fsharp/issues/1701), they're not present in the discussion (https://github.com/ionide/ionide-vscode-fsharp/discussions/1612 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.
- bmitc 4y agoI still need to get into OCaml. I of course know bits by virtue of having used F# and SML, but OCaml definitely has its own unique features. For F#, I appreciate how well it sits upon the host VM for the CLR and .NET. It just integrates almost seamlessly while still being a functional-first ML. When I use F#, it's by far the easiest code I write. I find myself just writing out the domain and boom, I got a working program. Recently, I wrote some bindings for a C/C++ DLL, and F# really made that easy. It's the easiest time I've ever had creating such bindings in a language. 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.
- ivraatiems 4y agoI've been a .NET developer professionally for seven and a half years. Rider is the way to go. Visual Studio has improved dramatically over the last decade or so, but Rider is still way ahead of it on code search/discovery, performance, and general user experience. I did a tech talk at my company where I demoed Rider vs Visual Studio 2019 performance on our bigger projects... it was embarrassing for VS. VS 2022 was substantially better on performance, but also crashed during the demo.
- bbkane 4y agoI'd love to watch that talk if you're comfortable posting a link
- ivraatiems 4y agoUnfortunately, because it contains proprietary source, I cannot :(.
- aaaaaaaaata 4y agoAnd...how do both companies compare in what telemetry they're sucking out of devs?
- SamuelAdams 4y agoFair question, devs who do not want to share telemetry for the dotnet core SDK simply need to set an environment variable. VSCode has a similar setting in the options. Not sure about Visual Studio as I haven’t used it in a while. https://docs.microsoft.com/en-us/dotnet/core/tools/telemetry https://docs.microsoft.com/en-us/dotnet/core/tools/telemetry
- fartcannon 4y agoOpt out is ridiculous for a programming language. Do you really want to play security whack-a-mole with your development environment? There are countless, better privacy respecting tools.
- zubspace 4y agoAbout 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/central-package-management https://docs.microsoft.com/en-us/nuget/consume-packages/cent...
- banashark 4y agoI'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 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.
- barking_biscuit 4y agoYeah this is probably one of the biggest pain points, but modern tooling is really helping to the tide on this. Dependency management is never fun in any language, and .NET has some quirks which make it a challenge as you say. I switched to .NET from java about 5 years ago now and I'm pretty I !are the switch as .NET just keeps getting better. Dependency management is one of the last pieces of the puzzle to really solve for in terms of getting a much better experience. That said if you're starting a brand new .NET project today you can set up your CI/CD pipelines to do Continuous Deployment and use Renovate to automatically upgrade your dependencies and merge if your tests are green. In addition the trend is for smaller codebases these days which makes it far easier to upgrade major versions of dependencies due to much smaller scope of breaking changes. I think those two things in combination eliminate some of the pain we've all felt with not being able to upgrade several years out of date dependencies in huge monolithic codebases. I'm pretty excited for the future of .NET to be honest.
- bbarn 4y ago> 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. 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.
- jve 4y agoHey fellow Dynamics 365 (CRM?) developer. 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/cli/introduction https://docs.microsoft.com/en-us/power-platform/developer/cl... [2] https://marketplace.visualstudio.com/items?itemName=microsoft-IsvExpTools.powerplatform-vscode https://marketplace.visualstudio.com/items?itemName=microsof...
- Kuinox 4y ago> that the official repo can only "unlist" packages, not delete them or that the publish times sometimes have horrible delays 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.
- sandreas 4y agoI know... but sometimes it is a bad thing for indie hackers testing around :-) Draft releases would be awesome.
- manigandham 4y agoYou don't have to use Nuget.org, it's just the public community version of a Nuget package repo. You can use your own private repos like MyGet[1] or Github Packages [2]. 1. https://www.myget.org/ https://www.myget.org/ 2. https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-nuget-registry https://docs.github.com/en/packages/working-with-a-github-pa...
- sandreas 4y agoYeah I know all this, you can even use BaGet[1] symbol server to cache or manage private dependencies in an enterprise network. That is not the point... I think that the most used tool / platform should provide more flexibility for non-enterprise or less expierienced developers. No offense, I like nuget, but I recently made a typo and checked in 0.0.23 instead of 0.0.2. Now, everytime I add a dependency that is < 0.0.23 to a project, that has not been synchronized / validated yet (the other problem I described), it automatically takes the best match, which is 0.0.23 assuming to be the newest package, even if unlisted. I also burned a 1.0.0 because of a failing script like that... not really bad, but annoying... https://github.com/loic-sharma/BaGet https://github.com/loic-sharma/BaGet
- metaltyphoon 4y agoWhy not just setup a local feed?
- nwah1 4y agoJust developed something using MAUI's predecessor Xamarin.Forms 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.