C
C#2y ago
ABCD

❔ How to have a Web Frontend and a C# backend (Desktop APP)?

I am wondering if there is a framework for this. I want to publish a .NET desktop application, however I am not too familiar with WPF and would rather stick to HTML/CSS/JS for the Frontend since I am a Web Developer. Is there a way to achieve this. Thanks in advance.
21 Replies
Monsieur Wholesome
Hybrid apps are what you want A desktop frontend gui with min. 1 WebView element that displays the content of a web backend Can be done with WinForms, WPF, MAUI, and stuff
Angius
Angius2y ago
Blazor Hybrid I think it was called
Monsieur Wholesome
That's just a loose name, pointing out the hybrid factor and using maui Usually you see "MAUI" and "Blazor" combined when talking about that specific project type
Kroks
Kroks2y ago
So Maui Blazor is a good option ?
Angius
Angius2y ago
Never used it myself, but it is the option if you want to have a web frontend There isn't really anything else, sans wiring something up yourself
Kroks
Kroks2y ago
publishing it as desktop app isn't a problem, right? But I assume its windows only. It looks promising nontheless
Monsieur Wholesome
I absolutely hate MAUI for its entire existence
Kroks
Kroks2y ago
damn xD
Monsieur Wholesome
But yeah, for the future it's probably the most viable option I wish Avalonia had a webview
Angius
Angius2y ago
It's the future only if you consider 1st party frameworks Avalonia sends its regards Oh, there's no webview in Avalonia? Odd
Monsieur Wholesome
Nope https://github.com/OutSystems/WebView <:DFrido_Think:964211837749051483> One sec Ah yeah, the non-web hosting, but just web-rendering of blazor https://github.com/AvaloniaUI/Avalonia/discussions/8414#discussioncomment-3052012
Yes, it's possible to implement.
Saying that, it's should be an interesting project, but it can't fit in the scope of our current release.
Kroks
Kroks2y ago
Another thing is that its relatively new and not much can be found about it yet (speaking of Maui blazor) not too popular yet sadly
Monsieur Wholesome
Yee
Angius
Angius2y ago
If I wanted an x-plat desktop app I'd definitely use Avalonia MAUI doesn't export for Linux Everything else is Windows-only
Kroks
Kroks2y ago
wasnt linux support planned?
Angius
Angius2y ago
It was planned, as in "the community will support it lmao" So there probably is some random repo by some random guy somewhere that adds some initial support for Linux
Monsieur Wholesome
I remember Patrick sending me a random nuget that supposedly adds linux support Lol Cuz I made the statement that maui doesnt have loonix support
Kroks
Kroks2y ago
Since you said that Blazor Hybrid thingie can be used for Winforms, WPF and MAUI. which one should I use? Should I go for WPF if its planned to have only a desktop app
Angius
Angius2y ago
https://learn.microsoft.com/en-us/aspnet/core/blazor/hybrid/tutorials/?view=aspnetcore-7.0 see which tutorial is most developed, I guess? I'd probably go with either WPF (since it can somewhat-easily be upgraded to Avalonia in the future) or MAUI (since it's at least somewhat x-plat)
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server