Live data from Hacker News

.NET 5.0

devblogs.microsoft.com

61–70 of 466 posts

Re: .NET 5.0

#61

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

alternatives?

F# with Giraffe, a functional ASP.NET core framework

Re: .NET 5.0

#62

I used to be an asp.net developer before. I appreciated the idea behind asp.net during its early years - making websites fast and with templating (or scaffolding). Later realized that it is bloat. Then asp.net mvc happened, a whole new paradigm shift. But then I disliked the idea of stuff getting inherited from somewhere. *.cshtml files and all. Soon I realized what the ide is actually doing behind the scenes. For e.…

You can use Notepad and run "dotnet run" to run your .net core programs, including winforms. .cshtml files can also be compiled at run-time or at build time with .net core.

Re: .NET 5.0

#63

Earlier 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.

async/await is the first class citizen .NET and C#. You just mark your function as async and return Task and you can call any async function with await, just like js.

Re: .NET 5.0

#64

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

You'd want your config injected so that you can swap out configs for test harnesses for continuous integration and deployment. It's one of the mainstays of making your software deployable by automation.

You know a better way of doing this?

appsettings.Test.json

Voila, different settings!

I've said elsewhere, the DEFAULT should be super simple, really, really, really easy to use. No thought, no effort, just use it.

If you want to go all crazy and start injecting values into your config in your unit tests, great to have that option, you should have that option. But you're the one who should be scrabbling around writing tons of extra boilerplate code, not me.

But I just want to set a filepath, that's probably never going to change, but might one day. Or an email address to send a weekly summary email to. Or some settings on paging that the client might change their mind about once and I don't want to have to rebuild the project.

The vast majority of config settings are just cover your ass in case you need to one day change this value. They don't need to be tested.

So it not the "normal" path to need to test config values. It's not the path the vast majority of programmers need.

Re: .NET 5.0

#65
Note that .NET 5.0 is not an LTS release:

> .NET 5.0 is a current release. That means that it will be supported for three months after .NET 6.0 is released. As a result, we expect to support .NET 5.0 through the middle of February 2022. .NET 6.0 will be an LTS release and will be supported for three years, just like .NET Core 3.1.

Re: .NET 5.0

#66
post #59

Earlier 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…

You wouldn't be using the config at all if you're not using the config files. They're part of the default project.

Re: .NET 5.0

#67

Earlier quoted context omitted.

For simplicity? Just like how js get async await thing eventually.

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)

Re: .NET 5.0

#68

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

I don't know about that. Pretty much all cross-platform solutions are a rounding error compared to the first-party Swift/Java platforms. I can believe there's potential for another yet.

Re: .NET 5.0

#69

So, on the plus side with the new .net, I recently made a .net core web app on Linux, and generally it's been pretty easy. I'm also impressed at just how fast asp.net core is compared to asp.net, the time it takes to open your site in debug mode has dropped dramatically, from what used to be 1/2 minute in asp.net to a few seconds in .net core. On the bad side? Mainly the asp.net core team and their push for Dependenc…

Can't you just ignore the built in configuration and roll your own (probably there's a dotenv library?). That said, I've also personally moved away from C# despite really likeing the lanaguage due to a lacking ecosystem.

I'd recommend both node with TypeScript and Rust for backend web development in a statically typed langauge.

Re: .NET 5.0

#70
I'm excited about this! I've used .NET Core to build some CLI tools for Linux in F#. It's great to have an alternative to Go in terms of mainstream, high level languages (read: has tons of good libraries) that can compile to an easily distributed Linux binary.
Post reply on HN