News for hackers. Stuff that matters.
Re:.NET 6 Released by slownews45 on Monday November 08, 2021 @12:24PM (#29151635)
Replace ".NET" with "Windows" maybe?

AS a longtime original VB/Winforms developer - MS lost their mind on desktop development and didn't look back.

They chased EVERY fad that could be chased. Silverlight, UPF, XAML, WPF, Islands, MAUI. This is one of those things - imagine if they'd focused on building an amazing and cross platform (ultimately) toolkit with just a basic drag and drop designer? Who cares about "styling" your app and all the rest of the garbage.

How many lost years and peoplehours?

Re:.NET 6 Released by tonyedgecombe on Monday November 08, 2021 @12:40PM (#29151854)
This has been their modus operandi forever.

I've got to the point where I don't trust them on any of this stuff. I target WinForms and if they ever decide to kill that then I'll abandon the platform completely.

>Who cares about "styling" your app and all the rest of the garbage.

One of the problems with WPF is the lack of styling of the standard controls. It takes a lot of work to ensure your app doesn't look like a turd.

Re:.NET 6 Released by LarryDarrell on Monday November 08, 2021 @04:44PM (#29154669)
I've been using MahApps.Metro[1] and MaterialDesignXAML[2]. Those two libraries have made me feel like sticking with WPF until I retire in 5 to 10 years. I'm constantly getting feedback from clients that the applications look so modern. It's been a nice selling point as my niche is rewriting VBA/VB6 engineering software.

[1]https://mahapps.com/

[2]http://materialdesigninxaml.net/

Re:.NET 6 Released by thefz on Tuesday November 09, 2021 @05:02AM (#29159675)
Same. WPF in an MVVM pattern is so comfortable to use once it clicks. It has its quirks but for everything there is a workaround once you stick to the pattern.

For the creators of Mahapps I have eternal gratitude.

Re:.NET 6 Released by int_19h on Monday November 08, 2021 @04:41PM (#29154637)
Why would you want to style standard controls in a desktop app? They should look the way they look everywhere else in the OS.
Re:.NET 6 Released by azinman2 on Monday November 08, 2021 @05:59PM (#29155440)
Windows has multiple competing standards in the same OS, even from their own software distributed with the OS. It’s embarrassing.
Re:.NET 6 Released by da_chicken on Monday November 08, 2021 @08:08PM (#29156465)
Every once in a long while (very long now) you'll stumble across a dialog box that looks like it's from Windows 3.1. ODBC is one of them that's still that old.
Re:.NET 6 Released by int_19h on Monday November 08, 2021 @06:19PM (#29155625)
It is, but there's still a standard system style that the majority of the apps are expected to use. Which is exactly what WPF uses - it's fairly easy to see if you take a WPF app and observe the differences on Win7/8/10.

In any case, surely, adding yet another different style only makes the problem worse.

Re:.NET 6 Released by azinman2 on Monday November 08, 2021 @08:39PM (#29156668)
Re:.NET 6 Released by rbanffy on Monday November 08, 2021 @07:07PM (#29156034)
Right now if i open a Sysinternals app I’ll have the text in the UI rendered in one way and the title bar rendered in another. It’s jarring.
Re:.NET 6 Released by azinman2 on Monday November 08, 2021 @08:39PM (#29156671)
Not to mention they behave differently with respect to HiDPI.
Re:.NET 6 Released by rbanffy on Tuesday November 09, 2021 @05:18AM (#29159798)
Remember how much criticism Linux and other unixes got by people complaining about apps created with KDE on Gnome desktops and vice versa?

I'll never forget ;-)

Re:.NET 6 Released by azinman2 on Tuesday November 09, 2021 @03:23PM (#29166965)
And that’s a disaster too.

Really the only one that’s done it correctly is Apple.

Re:.NET 6 Released by int_19h on Tuesday November 09, 2021 @03:37PM (#29167121)
Apple also did this whole "our apps are special" thing more than once.

I don't know why, but there's this weird temptation for every app to try to present itself as some kind of unique work of art, when it comes to UX. But I don't want art, and I don't want branding. I just want ergonomic tools - and part of ergonomics is not to have to re-learn everything every time you pick up a new thing.

Re:.NET 6 Released by atheken on Tuesday November 09, 2021 @06:38AM (#29160320)
Nobody mention the gui toolkits for Java or desktop window managers for Linux…
Re:.NET 6 Released by jug on Monday November 08, 2021 @07:38PM (#29156267)
WPF has no such concept. Even if you don’t use a library for this, it’ll then just use the built in style after detecting your OS version and adapting to that. But it does this by pulling out hard coded resources shipping with WPF. If you wish, you can override and tell WPF to look like XP on Windows 10 instead… It’s all just a good try, but still a facade. It does not and can not (per design) rely on “native controls”. I suppose because it’s DirectX based rather than GDI.
Re:.NET 6 Released by TYPE_FASTER on Monday November 08, 2021 @01:13PM (#29152280)
Not only lost productivity, but getting executive buy in to invest in WPF was difficult after Silverlight.

Kinda joking, kinda serious, but all the Microsoft UI changes in the last 10-15 years have definitely helped enterprise IT adopt internal web applications. :)

Re:.NET 6 Released by spaetzleesser on Monday November 08, 2021 @01:45PM (#29152678)
Very true. I used to be a desktop dev but since Windows 8 MS has convinced me it’s better to do web stuff.
Re:.NET 6 Released by rbanffy on Monday November 08, 2021 @07:09PM (#29156048)
It’s fun to think that, after all these years, we are back to screen-oriented terminals (browsers) accessing mainframes (cloud apps)…

I loved the 3278.

Re:.NET 6 Released by cudgy on Tuesday November 09, 2021 @01:02PM (#29165047)
And now we write “screen scrapers” to get information from html instead of the terminal emulators. Rinse. Repeat.
Re:.NET 6 Released by cudgy on Tuesday November 09, 2021 @01:01PM (#29165019)
<sarcasm> True. Frameworks to build web applications only come out every few months.
Re:.NET 6 Released by moogly on Monday November 08, 2021 @04:15PM (#29154376)
IMO they need to realize the common denominator of all these failed and deprecated frameworks is the very thing they've desperately clung onto over all these false starts... and that is XAML.

Get rid of it.

Re:.NET 6 Released by tasogare on Monday November 08, 2021 @11:30PM (#29157761)
XAML is good. It's very easy to build interface by nesting components then styling it if needed, and doing data binding. All the web alternatives are harder to use and came 10-20 years later.
Re:.NET 6 Released by hizanberg on Tuesday November 09, 2021 @12:34AM (#29158096)
XAML is why I’ll never write a Desktop App with .NET, who’s been unable to rid themselves from it.

React, Vue, Svelte as well as Flutter & SwiftUI all implement different but vastly more productive reactive dev models.

MAUI will not be resurrecting .NET Desktop Apps which have been on decline since WPF. Blazor Desktop Apps might, anything XAML won’t.

Re:.NET 6 Released by fpig on Tuesday November 09, 2021 @12:16PM (#29164395)
XAML is the only thing I was ever able to write a complex layout in, run the app, and see it look exactly as what I intended on the first attempt. That would meet my definition of productivity.

For example, my experience with CSS has been the opposite of that. F5 a million times before the layout works the way I want it to. Sometimes even googling how to do create some type of layout because I can't think of it on my own.

Re:.NET 6 Released by Angius on Tuesday November 09, 2021 @01:20AM (#29158350)
XAML is good for structure, same way HTML is. But by god is styling it a major PITA of boilerplate nesting hell
Re:.NET 6 Released by FpUser on Monday November 08, 2021 @02:28PM (#29153161)
>"They chased EVERY fad that could be chased. Silverlight, UPF, XAML, WPF, Islands, MAUI"

Being a wise man I spared myself from this madness long time ago;) When I need Windows Desktop App I use Delphi or lately Lazarus that can do both Windows and Linux GUI from a single source and produce native standalone executables.

Re:.NET 6 Released by int_19h on Monday November 08, 2021 @04:43PM (#29154657)
WinForms is still around, and works as well as it always did. That or WPF are still the sanest choices for desktop apps in .NET, IMO, so long as you're only targeting Windows. And WinForms specifically resembles VCL a lot.
Re:.NET 6 Released by FpUser on Monday November 08, 2021 @05:10PM (#29154927)
I skipped .NET bandwagon for desktop completely. Comparatively to Delphi there were exactly zero business reasons for me to move my code or use .NET for new apps.

On a technical side there were no gains and numerous limitations.

Re:.NET 6 Released by int_19h on Monday November 08, 2021 @05:35PM (#29155177)
On the technical side, the biggest productivity gain is from having a garbage collector. Beyond that, language features: while C# 1.0 started in a spot very similar to Delphi (+GC), it evolved much faster - e.g. getting generics in 2005.

But, yes, if you looked at it in 1.x days, it really looked a lot like Delphi libraries with Java-like syntax. So if you were already using Delphi, there wasn't much point.

Re:.NET 6 Released by FpUser on Monday November 08, 2021 @07:00PM (#29155991)
>"On the technical side, the biggest productivity gain is from having a garbage collector."

1) I use leak detection tool so no productivity gain in that area. Besides it is burned into my brain to always write deallocation code first before doing any allocations. That is when my classes are not using interfaces that are reference counted. In reality I could hardly remember any instances when memory / resource leak tool showed any. Also I did not have to dance around IDisposable, Weak and object caches shenanigans.

2) Generics - this is great feature but in my opinion it is mostly geared towards libraries writers. Being more of a product / application oriented bar few exceptions I personally do not use it much neither in C++ nor in Delphi (Delphi has generics since 2009).

Re:.NET 6 Released by naasking on Tuesday November 09, 2021 @09:10AM (#29161923)
> 1) I use leak detection tool so no productivity gain in that area.

These are never as good as garbage collection. In some cases, not even close.

Re:.NET 6 Released by FpUser on Tuesday November 09, 2021 @09:18AM (#29162023)
I consider this statement false
Re:.NET 6 Released by naasking on Wednesday November 17, 2021 @12:11PM (#29255757)
Consider it false all you like, the proof is in the pudding:

https://www.forbes.com/sites/gordonkelly/2021/11/16/google-c...

Re:.NET 6 Released by spaetzleesser on Monday November 08, 2021 @01:43PM (#29152658)
And the crazy thing is that all these frameworks were basically incompatible variations of the same thing. Since WPF nothing has really gotten better. Just different for no good reason.

I will never bet on any new MS desktop development framework anymore . It’s either WPF or preferably web (even Electron) for me.

Re:.NET 6 Released by orra on Monday November 08, 2021 @02:37PM (#29153286)
To be fair to UWP XAML, it's more efficient than WPF.

I don't mean because it's written in C++ instead of C#. The render pipeline of WinUI is more efficient. It's really interesting, but unfortunately I can't find the technical blog I was thinking on.

Re:.NET 6 Released by n8cpdx on Monday November 08, 2021 @03:07PM (#29153598)
It’s more efficient but much less reliable. Like if you change from light to dark mode, there’s a 20% chance all UWP apps that are open crash.

And as efficient as it is, it still can’t resize windows without flickering. It’s worse than WPF or Win32. And there still aren’t proper APIs for configuring the titlebar area.

I wish they focused on getting their vendor partners to make efficient processors, rather than try to get all windows developers to rebuild software to run on hobbled ARM hardware.

Re:.NET 6 Released by spaetzleesser on Monday November 08, 2021 @05:53PM (#29155382)
That doesn’t explain why they had to roll a new framework instead of improving WPF. It may have been ok if they provided an upgrade path but since Winforms they haven’t bothered with that either.
Re:.NET 6 Released by pjmlp on Tuesday November 09, 2021 @02:40AM (#29158866)
Politcs, driven by the same group that botched Longhorn in name of C++ and COM.

https://arstechnica.com/features/2012/10/windows-8-and-winrt...

Re:.NET 6 Released by bmitc on Monday November 08, 2021 @03:57PM (#29154155)
> Replace ".NET" with "Windows" maybe?

There's Uno, Avalonia, Xamarin Forms, and MAUI, all cross-platform. I think it's a mess no matter what.

Re:.NET 6 Released by to11mtm on Monday November 08, 2021 @05:35PM (#29155173)
In all fairness, at one point you could actually make sense of things.

Unless I'm misremembering, until recently Avalonia was still being touted as primarily a replacement for Desktop WPF. I was shocked to see they're talking about mobile now too. I guess it's somewhat expected.

Uno basically does what MAUI does. The main difference being, Uno has been around for a while longer and something you've been able to use for some time. I'm pretty sure they had usable versions for well over a year before MAUI was even announced.

In any case...

Microsoft's UI story is a non-starter until they get back to the point that a user can:

- Click new project - Fill out the form - Get a Design window, - Drag a 'Textbox' into the design window, - Drag a 'Button' into the design window, - Double click on the button, get taken into a generated event handler, and the user can intuitively put in the right code (i.e. updating the viewmodel with 'hello world'.) - Click 'run'

That's the Story that got an untold number of new developers -enamored- with VB6, a language that got so entrenched Microsoft had a hard time killing it. It brought a number of developers into the world of C#, making it easy for to write applications used at work that a whole team could use. That's actually how I 'eased' into programming at my first workplace; I wrote an app with a big ugly panel and a bunch of big buttons with labels that would automate tasks. Need a variation on a theme? Drag a new button over, maybe do some light refactoring, test, publish, tell the guys to restart the app. 10-15 minutes tops.

Sure, Eventually I had to go through a spaghetti mess of callbacks and crappy generated code, but it was good refactoring practice ;). And when I left the company, someone else took over the code and now they are a software developer too.

Re:.NET 6 Released by slownews45 on Monday November 08, 2021 @07:11PM (#29156071)
And you could really evolve it. Databinding was surprisingly good and easy and fast - still beats web in my view - autocomplete, panels / options groups / tabbed windows etc all worked well (and were fast).
Re:.NET 6 Released by fpig on Tuesday November 09, 2021 @12:53PM (#29164918)
> Microsoft's UI story is a non-starter until they get back to the point that a user can:

Why do you care about this stuff? I don't understand. Surely most developers can build a simple app with a few buttons easily in whichever framework they're using. This stuff doesn't really matter for I'd dare to say 90% of developers. What matters is how hard it is to build and maintain complicated stuff. And there WPF blew WinForms (and VB6) out of the water.

Not sure why you think how difficult it is to put a couple buttons on a page and make them do something would have any effect on the success of a UI framework. That's literally not even a consideration when we make decisions on what to use for a project.

If WPF ran on other platforms, we would use it for everything. We use Avalonia instead, and it's pretty great.

But there are 2 basic types of multiplatform UI frameworks - the ones that wrap native controls and look like most other apps on the platform, and the ones that do their own rendering and look the same on every platform. Avalonia is in the second group, so if the former is a hard requirement then it is not a good choice.

Re:.NET 6 Released by to11mtm on Wednesday November 10, 2021 @11:30PM (#29184435)
> What matters is how hard it is to build and maintain complicated stuff.

What matters is how hard it is to deliver a product to the end users. As I gave in my personal user story, yeah, I had to eventually pay the piper and refactor significantly to make sure things were maintainable. But it was a good lesson learned, and I've met many other developers over the years who got hooked on C# in a similar way.

> And there WPF blew WinForms (and VB6) out of the water.

WPF would be fine for this scenario. If we could do things like this at a WPF level of designer I'd be happy. It's got a little more of a cognitive load to get started but long term is easier to reason about long term and from a conceptual standpoint is more transferable to other contexts (i.e. Web MVVM Frameworks.)

I haven't looked at Avalonia in it's current state (last time I gave it a peek, it was still in a 'almost-ready' status) but if they really are able to do multiplatform as I see they say now then perhaps that's what I'm saying is needed. (Which may be more of a statement on the state of Real OSS Awareness in the .NET community.)

Definitely will give it a go, since I know it's supposed to be a replacement for WPF so I'm hoping(?) that the existing tooling out there is usable

Re:.NET 6 Released by naasking on Tuesday November 09, 2021 @09:08AM (#29161898)
> - Click new project - Fill out the form - Get a Design window - Drag a 'Textbox' into the design window, - Drag a 'Button' into the design window

Non-starter these days. Building a form graphically doesn't take into account multiple screen sizes and screens that can change dimensions on the fly, which are now far more prevalent than the heady desktop UI days that you're talking about here. Unless you have some novel idea for how to design graphically for all sorts of screen sizes.

Re:.NET 6 Released by to11mtm on Wednesday November 10, 2021 @08:13PM (#29183266)
> Non-starter these days.

It's about the species; Remember that I mentioned that in the context of 'someone getting started'. I say what I say because it would be the best thing to help new users get 'hooked,' not necessarily because it's the best way to make a maintainable app. (IDK though, some of my one-team winforms stuff was actively maintained for years after I left)

> Building a form graphically doesn't take into account multiple screen sizes and screens that can change dimensions on the fly, which are now far more prevalent than the heady desktop UI days that you're talking about here.

There's no reason you couldn't handle such a thing in WPF. Sure, it may be more -work- to check representation in both formats, and some form of helper (that would handle certain scaling factors of buttons/etc) would be a boon to developers. That's not the way I look at it though, see below;

> Unless you have some novel idea for how to design graphically for all sorts of screen sizes.

It's not necessarily about making a 'single' UI that works on both mobile and Desktop. If you can even get to the point where a user can make separate Mobile -and- Desktop 'form-style' built screens for their app, all in one happy framework/language... Frankly that would be the best thing overall, since you can provide optimized Desktop -and- Mobile UIs, and not have to have a bunch of disparate technologies used to build each.

Re:.NET 6 Released by bmitc on Tuesday November 09, 2021 @10:17AM (#29162813)
I personally think it's a mistake that frameworks try to be all in one by trying to target mobile (phones and tablets), desktops, and even web. It just doesn't work, and I don't know of a single platform that actually accomplishes it without major limitations on one or more platforms.
Re:.NET 6 Released by chadcmulligan on Tuesday November 09, 2021 @06:17AM (#29160193)
> - Click new project - Fill out the form - Get a Design window, - Drag a 'Textbox' into the design window, - Drag a 'Button' into the design window, - Double click on the button, get taken into a generated event handler, and the user can intuitively put in the right code (i.e. updating the viewmodel with 'hello world'.) - Click 'run'

Its been a while since I looked at these and I was having a look for a designer like WPF for Win UI/Uno etc - does this not exist?

Re:.NET 6 Released by to11mtm on Wednesday November 10, 2021 @07:59PM (#29183154)
When I played with Uno, There was a UWP designer (At the time Uno relied on UWP for the API/Translation, IDK if that's changed.) It worked mostly like the WPF designer but I think it was slightly more limited.
Re:.NET 6 Released by TillE on Monday November 08, 2021 @12:52PM (#29152011)
Also if you still need to support XP (even back when it was still getting patches), forget it, Microsoft has no interest in supporting you.

Even if you want to use the latest and greatest UI, your customers need to keep up too. Completely unworkable.

Re:.NET 6 Released by ClumsyPilot on Monday November 08, 2021 @10:31PM (#29157387)
XP is 20 years old, its older than invasion of Afganistan.
Re:.NET 6 Released by andai on Tuesday November 09, 2021 @01:41AM (#29158492)
I recently ran XP in a VM inside Windows 10 and was amazed at how much faster everything ran, how quickly programs start, and how responsive they are. Feels like we lost something along the way...
Re:.NET 6 Released by ChicagoDave on Monday November 08, 2021 @07:03PM (#29156013)
WPF compiling to WebAssembly would be ideal.
Re:.NET 6 Released by vb6sp6 on Monday November 08, 2021 @02:14PM (#29153021)
are you still doing desktop work? if so, what are you using?
Re:.NET 6 Released by slownews45 on Tuesday November 09, 2021 @11:56AM (#29164150)
I actually moved away from desktop.

Lightweight web apps mostly in python (Flask).

Slack apps / bots with a bunch of commands (backend does lookups, generates PDFs)

People don't fully realize what we gave up dumping desktop development, you used to be able to build our nice biz specific crud apps (customers, projects, scheduling etc) using a bunch of tools. These things were usually darn fast if you were careful and you could make them very keyboard driven (ie, put the keyboard shortcuts on button labels etc).