Live data from Hacker News

.NET for Beginners (2020)

dusted.codes

171–180 of 192 posts

Re: .NET for Beginners (2020)

#171
post #70

Earlier quoted context omitted.

> Okay, where do you start in Learning C#? What do I have to install? What should I install? Visual Studio Community Edition 2019. Done. edit: I would encourage using regular .Net, not .Net Core until they've reached a certain threshold.

> I would encourage using regular .Net, not .Net Core until they've reached a certain threshold This is terrible advice. .NET Framework has so many gotchas in its dependency management and binding redirect hell, not to mention ASP.NET 4.x is full of hidden "magic" and serious usability problems. Anyone starting a new project should be on .NET 5/Core, and that's been true since the Core 2.x releases. Also, the generic…

woah, I was a pretty expert C#/.NET developer until about 5 years ago, when I switched to Python and C++ for my dayjob. I've not kept up with the ecosystem since then. .NET Core was sort of in its infancy, and we were debating moving over at the point when I left that company, so I've never used Core.

but ...I can barely read that page and understand what's going on!

This is something I did notice with the c# codebases I worked on; you could date them to the month based on whatever "hot shit" patterns were used by each project. I thought this was normal for every language, but since working on large codebases in other languages, I've found that it's mostly a C# thing (Java has a bit of that too).

But man, it's insane how much the language and the ecosystem has changed in 5 years.

Re: .NET for Beginners (2020)

#172
post #170

Earlier quoted context omitted.

The thing about .NET is that while it is confusing at the moment, and the naming isn't great, it's not a bunch of truly different technology. Microsoft is replacing their legacy Windows-only framework with a new cross platform framework with the end-goal being nearly fully backwards compatible. There is slightly more to it than that but that's the basic gist of it. Heck, they've even brought over Winforms -- that tec…

The main issue I've had is that everything is supported, but it's very difficult to find out what the current "best practice" is. E.g. I can use winforms (because backwards compatibility with MS reigns supreme), but it's replaced by WPF and UWP (which also have various limitations, like UWP is windows 10 only), which themselves are replaced by MAUI as the modern system (which isn't ready). So the framework to pick fo…

> So the framework to pick for a new application is... I don't know.

You just described all UI the frameworks, what replaces what, and what the limitations are! Microsoft also lays that out here: https://docs.microsoft.com/en-us/windows/apps/desktop/choose...

I've answered this question for myself: WPF. It's neither bleeding edge nor is it obsolete.

You can complain about the current state of things but I don't think there's any argument that Microsoft is doing the wrong thing here. They're iterating on their platform, making improvements, and supporting existing technology.

Re: .NET for Beginners (2020)

#173
post #145

Earlier quoted context omitted.

I can confirm that. If you don't know exactly what you are doing, don't build a desktop application. Build a web application, you are safe and protected there.

I'm sad to say I agree, because building apps with WinForms and WPF is incredibly fast and enjoyable. Using the RAD approach to application design makes it super easy to stick together working, *useful* software very quickly, that doesn't have to look terrible. I miss the days of writing desktop software, it was nice :)

See, I'm an old and crusty person because if I'm writing some internal tooling for a company and I could use C# and we're in Windows, WinForms is the obvious answer. I never liked WPF and WinForms was drag and drop and crazy easy, so I would just use it. It's not like it's actually going away, Microsoft doesn't fully deprecate anything that could be used by any of their enterprise customers and I'm sure looooots of them use WinForms.

Re: .NET for Beginners (2020)

#174
post #128

Earlier quoted context omitted.

Because winforms is an incredibly easy and solid technology. It's a joy to work with.

CPU rendering should not be a thing in 2021

CPU rendering is an implementation detail for the majority of WinForms. Unless you're running the paint component command yourself, that could be offloaded elsewhere.

Re: .NET for Beginners (2020)

#175
post #127

.NET definitely has a messy past but someone arriving today probably has the easiest time ever getting started because so much has changed to become a single streamlined product. All these opinions are weighed down by the very history that beginners don't have. The expansive standard library, web/desktop/mobile/gaming output, Visual Studio (Code) IDEs, fantastic in-depth guides and documentation [1], dev evangelists…

> a single streamlined product. Problem is, the past will remain with us in every book, code example or stackoverflow answer. As a beginner you need to understand the difference between .net framework and .net core because any blog post or tutorial will reference one or the other. Now people start calling it .net 5 or .net 6 instead of core, but you have to understand that this is incompatible with ".net framework" o…

This is a problem for every language stack. .NET has been around for 20 years, there's no way to have the rest of the web constantly update everything. The official documentation helps by being very thorough and gets you pretty far without needing other research.

Re: .NET for Beginners (2020)

#176
post #128

Earlier quoted context omitted.

CPU rendering should not be a thing in 2021

CPU rendering is an implementation detail for the majority of WinForms. Unless you're running the paint component command yourself, that could be offloaded elsewhere.

It is an implementation detail, but we are talking about a concrete framework with one implementation, not an open spec API. And as far as I know it visibly flickers on any window that has like more than 3 input forms.

Re: .NET for Beginners (2020)

#177

Earlier quoted context omitted.

Winforms is easy to use and understand, everything is pretty much there and I can get started with no issues. WPF,on the other hand,is a clusterfuck, not even sure who managed to come up with it.

There are a lot of great ideas in WPF, but sadly the implementation of those ideas is really, really clunky. If you're experienced with WPF you can build very complex applications quickly, but the learning curve is very steep. There's also a million gotchas when it comes to performance, and when things go wrong, they go wrong bad, and you end up spending many hours trying to figure out why you're getting a stack over…

Seriously. Microsoft is one of the few companies with enough historical successes that teams can have "not invented here"isms about first party products.

Maybe start with why people are still using a 19 year old UI framework.

Re: .NET for Beginners (2020)

#178
post #90

Earlier quoted context omitted.

> Are one or more of them about to be deprecated? All of them are. Not officially , of course, but practically speaking all of them are dead-ends. MAUI is the "new hotness", which means that it'll only become obvious that it is also a dead end in about a year and a half. I wish I was joking.

At least until last year, I think the community used mostly winforms if it is for Windows operating system. MS is not too happy about that.

[deleted]

Re: .NET for Beginners (2020)

#179
post #127

.NET definitely has a messy past but someone arriving today probably has the easiest time ever getting started because so much has changed to become a single streamlined product. All these opinions are weighed down by the very history that beginners don't have. The expansive standard library, web/desktop/mobile/gaming output, Visual Studio (Code) IDEs, fantastic in-depth guides and documentation [1], dev evangelists…

> a single streamlined product. Problem is, the past will remain with us in every book, code example or stackoverflow answer. As a beginner you need to understand the difference between .net framework and .net core because any blog post or tutorial will reference one or the other. Now people start calling it .net 5 or .net 6 instead of core, but you have to understand that this is incompatible with ".net framework" o…

> because any blog post or tutorial will reference one or the other

Or neither, if it was written before Core (in which case it's Framework).

Re: .NET for Beginners (2020)

#180
post #170

Earlier quoted context omitted.

The main issue I've had is that everything is supported, but it's very difficult to find out what the current "best practice" is. E.g. I can use winforms (because backwards compatibility with MS reigns supreme), but it's replaced by WPF and UWP (which also have various limitations, like UWP is windows 10 only), which themselves are replaced by MAUI as the modern system (which isn't ready). So the framework to pick fo…

> So the framework to pick for a new application is... I don't know. You just described all UI the frameworks, what replaces what, and what the limitations are! Microsoft also lays that out here: https://docs.microsoft.com/en-us/windows/apps/desktop/choose... I've answered this question for myself: WPF. It's neither bleeding edge nor is it obsolete. You can complain about the current state of things but I don't think…

>You just described all UI the frameworks, what replaces what, and what the limitations are! Microsoft also lays that out here

The problem is that all options lack some core fundamental expected feature. From that chart, WinForms lack High DPI awareness and customizable UI (tbh I'm not sure what customizable means here -- that custom controls/views are difficult or just skinning is difficult?), WPF also lacks High DPI and UWP lacks fallbacks (and a bunch of basic OS features like direct file access? I don't know why that's the case).

The differences between them aren't even trade-offs, so much as randomly incomplete. Granted, I haven't spent any time whatsoever trying workarounds -- maybe it's simple enough (WPF is clearly the least problematic, if DPI scaling can be worked around without much trouble). I've just been looking at the charts like that, and my ultimate answer is "???"

>You can complain about the current state of things but I don't think there's any argument that Microsoft is doing the wrong thing here

I think there is; Microsoft runs the .net ecosystem as its steward -- it intentionally creates, markets and governs pretty much every major framework and components that exists. For better or worse, the state of .net ecosystem is owned by Microsoft -- unlike say, rust, golang, python, c++, ruby, etc where the language maintainers are mostly divorced from the language ecosystem, and make no real say in the matter beyond broad recommendation of community-run frameworks (python is a little different, being batteries-included, but it's also well-known that stdlib is where libraries go to die; no one recommends python stdlib as best-in-class of anything). .NET is of course a non-closed ecosystem, and the community does contribute quite significantly, but nonetheless, if it's first-class it's almost always MS.

The current state of affairs is essentially a result of bad ownership; the high rate of churn in the javascript ecosystem can be blamed on the JS communities. The high rate of churn in the MS ecosystem can be blamed on MS. They've constructed a complex environment with unclear recommendations and continuous deprecation (fine, they're never actually deprecated because MS policy on backwards compatibility is second to none, but its "legacy"), a terribly confused naming convention and wide swath of overlapping technologies.

Don't get me wrong, MS does cool work, but they've made quite a mess, and it's quite clearly a result of constantly changing vision of how the .NET ecosystem should look like -- in combination with new projects seemingly forgetting MS's stance on backwards compatibility (nothing is ever just superseded; there must be an upgrade path or you will end up maintaining both forever [Unity has the same fundamental misunderstanding of their feature development]).

If there are going to be 4 UI frameworks, they should be competing on different models, APIs and mindsets (eg MVC vs MVVC vs MVU -- it's absurd that they're competing on core fundamental features instead). Although on the web-side of things, I think this is actually the case for .NET -- blazor vs MVC5 represent entirely different ways of approaching the problem. But AFAICT winforms vs UWP are really, from the programmer's perspective, the same thing. The underlying technology support changes (but in that case, you would ideally have the options be functionally complete).

Anyways as I said I've only been looking at it for the last year but that's my interpretation thus far -- the only way to understand the .NET ecosystem is to understand all the paths MS has taken, untaken, and re-routed. because their actual messaging and vision (as it connects to what they've implemented) is quite confused

Post reply on HN