Damselfly icon indicating copy to clipboard operation
Damselfly copied to clipboard

Blazor Desktop to replace Electron Client

Open Webreaper opened this issue 4 years ago • 4 comments

https://devblogs.microsoft.com/dotnet/announcing-net-6-preview-1/#blazor-desktop-apps - see https://github.com/dotnet/aspnetcore/issues/27217

Webreaper avatar Feb 18 '21 10:02 Webreaper

Seems like a big investment. Since blazor still uses a webview I dont see the appeal. Why not make a proper xaml interface then? You can use Uno platform and support every platform too (edit: and you can do so today! instead of waiting till maui/winui3 is complete).

Jogai avatar Mar 02 '21 20:03 Jogai

I think you misunderstand the architecture of the app. It already works on all platforms, and the UI is all Blazor Web-based, server-deployed. The desktop client is just a container which has some native client-side functionality to allow some native interop. It's a very minimal part of the app.

The investment would only be to replace the electron container with something else (webwindow, in this case, because of its smaller memory and deployment footprint). So a few hours max.

I've no interest in rewriting the UI (and essentially the app) to use Xaml, that doesn't really make much sense architecturally. Uno looks interesting, but I'm not sure there's a big future for Xaml really. But I'm bemused by your use of the word "proper". 😁

Webreaper avatar Mar 02 '21 20:03 Webreaper

You are correct, I didn't check what the current state was.

English is not my native language.

Jogai avatar Mar 03 '21 06:03 Jogai

Alternative option - once .Net 7 brings Blazor Hybrid, add WASM to the front end and use https://github.com/KristofferStrube/Blazor.FileSystemAccess to do the file access that the Desktop Client provides today.

Webreaper avatar Mar 03 '22 09:03 Webreaper