With Linux support AOT compliation and other goodies I wonder how many people will prefer writing backends in .NET over Java.
No thanks. I've been writing .Net since before day one and quite frankly I've been buggered around enough now to run as far away from this as possible.
.NET 5.0
81–90 of 466 posts
Re: .NET 5.0
#82Earlier quoted context omitted.
So you want to pause the thread and keep it from processing other requests for simplicity?
That is literally how php does. Let's fire a thread for every request and block on db reading or any action that require io. And it seems it works (at least for php)
Also, for high-traffic websites, that's really not a great idea. You might say "but Facebook, PHP" - I'm really certain that their current codebase doesn't have a thread that blocks on DB for each user request.
Re: .NET 5.0
#83Does anybody knows if .NET 5.0 will be included in Windows as a Windows Update as the .NET Framework ?
It won't be. .NET Framework is an embedded component of Windows. .NET Core is something apps have to package along with them. (Due to this, .NET Core apps are larger than .NET Framework apps, but tend to have less compatibility issues in theory, since they bring everything they need with them.)
Re: .NET 5.0
#84Earlier quoted context omitted.
>and you're in for an even bigger nightmare if you want to separate business logic and web code into two projects (which is a pretty common design). I've given up with the config DI and just assign them all to static variables. So you have static variable in web project and then add reference to web project to obtain that config? Do I get that right? I never felt like config DI was a problem once you did all the stuf…
To me it's just so pointless, here's an example: using Microsoft.Extensions.Configuration; //extra line using Microsoft.Extensions.Options; //extra line public class AdminController : Controller { IOptions settings; //extra line public AdminController(IOptions settings) //extra code { this.settings = settings; //extra line } public void RandomMethod() { var a = settings.Value.FinallyMySetting; // 5 extra lines to acc…
ASP.NET Core does push you strongly towards dependency injection, but it does not force you at all to use it.
Re: .NET 5.0
#85> .NET 6.0 will use the same approach, with net6.0, and will add net6.0-ios and net6.0-android Huge endeavor and launch! Looks like mobile app development will be the same with Xamarin
Mobile development in C# is just dead. Flutter got all the momentum.
Re: .NET 5.0
#86Earlier quoted context omitted.
You can do that just with different config files or env vars too. No need to complicate code for stuff that can be done easily differently as well.
And then you realize that it's 2020 and you don't want configuration files, you want environment variables. Or, now that you've hardstuck yourself on environment variables and built all this stuff around them to set and re-set them properly between tests (now running either in multi-process, which good luck in most environments, or are just running in serial ), you're using k8s and the voluming of secrets rather than…
Re: .NET 5.0
#87Earlier quoted context omitted.
I do agree I just type IOptions config in ctor, use ctrl+. and private readonly property and it's initialization is generated
That doesn't work unless you already have the using statements, which you won't have as you haven't added it yet. I just tried it.
Re: .NET 5.0
#88Earlier quoted context omitted.
Authentication is in the request pipeline, so it makes sense that it's async if you're talking to some sort of storage engine. We're using the async APIs to pull user/client app information from our database. Why would we want that to be synchronous?
For simplicity? Just like how js get async await thing eventually.
Re: .NET 5.0
#89is this an in-place update to the netcore3.1 runtime or does it install side by side for net5.0? just want to know what kind of risk it is to install. i got bit by the netfx48 in place update.
How did net48 bite?
Re: .NET 5.0
#90Earlier quoted context omitted.
I do agree I just type IOptions config in ctor, use ctrl+. and private readonly property and it's initialization is generated
That doesn't work unless you already have the using statements, which you won't have as you haven't added it yet. I just tried it.
https://i.imgur.com/cWs1M77.png
and I have some naming rule
https://i.imgur.com/iPwNj5b.png
So I basically have to type IOptions Name and use ctrl+. twice in order to generate private readonly property and initialize it and add using to IOptions