dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

Epic: Blazor developers can target and deploy their applications to desktop platforms, allowing them to run natively #2536

Closed maddymontaquila closed 2 years ago

maddymontaquila commented 4 years ago

Summary

In .NET 6 we want to extend Blazor's target scenarios to include native desktop applications via web-based rendering.

Note: This is a proposed experience for .NET 6 and not yet committed.

User Stories

User Stories under this Epic:

RChrisCoble commented 4 years ago

Are other platforms in play here as well? Like MBB's usage of iOS and Android to complete this story? Or maybe the inclusion of MBB into ASP.Net brings those and this epic fills the gap?

Eilon commented 4 years ago

I'm in the loop, One .NET!

RChrisCoble commented 4 years ago

@Eilon !!! I for one welcome our One .Net overlords.

For me, there's one big piece which brings Blazor together in a powerhouse .Net 6 release, but it's over on the Runtime team. @danroth27 can you throw your weight around to get this slotted between now and November?

.NET WebAssembly support of task based parallelism. #40619

wakuflair commented 4 years ago

Is it something with MAUI?

ghost commented 4 years ago

Thanks for contacting us. We're moving this issue to the Next sprint planning milestone for future evaluation / consideration. We will evaluate the request when we are planning the work for the next milestone. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

kristof12345 commented 3 years ago

Hi! Any update on this? Can we expect this feature in .NET 6? Thank you.

Eilon commented 3 years ago

Hi @kristof12345 yes this is part of the plans for .NET 6!

Pilchie commented 3 years ago

:eyes:

mrlife commented 3 years ago

With MAUI introducing support for the Android and iOS platforms, and since Blazor is built on top of MAUI, will Blazor support those platforms as well?

Eilon commented 3 years ago

@mrlife the main goal for .NET 6 is to support the Windows and macOS desktop platforms, but we will surely have code running on Android and iOS as well, but it might not be fully supported at that time.

LeonarddeR commented 3 years ago

I hope that accessibility for impaired people (like blindness) will be accounted for so apps like these will be accessible from the start, or at least the examples will be.

kmanev073 commented 3 years ago

Is this available in the .NET 6 Preview 1? Thanks in advance.

todosrc commented 3 years ago

I want Blazor Desktop to also support automatically update themselves. like electron-updater.

Idea :

https://github.com/ElectronNET/Electron.NET/issues/259 https://github.com/ElectronNET/Electron.NET/blob/master/ElectronNET.API/AutoUpdater.cs

https://github.com/NetSparkleUpdater/NetSparkle https://github.com/Squirrel

cheers>>

Eilon commented 3 years ago

@leonardder accessibility is certainly important for all apps so I'm adding that to the checklist of things to look into.

Eilon commented 3 years ago

@kmanev073 said:

Is this available in the .NET 6 Preview 1? Thanks in advance.

It is not in Preview 1. We plan to have this in no later than Preview 4.

Eilon commented 3 years ago

@todosrc said:

I want Blazor Desktop to also support automatically update themselves. like electron-updater.

Installation/deployment/update support is an interesting problem, and we are looking at various solutions to this, including using some of the ones you mention!

birbilis commented 3 years ago

Remember ClickOnce deployment?

robertmclaws commented 3 years ago

So, something to consider while you folks are looking into this.

I'm building BurnRate.io, and we're in the process of moving a large OData/TypeScript/Webpack app to Blazor. When we add support for installing the app to the Desktop, we're still planning on shipping our Blazor WebAssembly version to the web, so people can access it where- and however they want. Up to this point, we had planned on doing that through Electron.NET.

However, Electron's update infrastructure is less than awesome, and requires a lot to build multiplatform update binaries. This should be wholly unnecessary with Blazor.

It would be great if the Blazor Desktop version could just download a manifest of MD5 hashes for the app files, and if any of them differ from what is installed, the app downloads them from the server-deployed version. That way, it's seamless for everyone, I know my customers will always be running the latest version, and you don't have to worry about trying to package MSI files or anything like that.

If security is an issue, then the files could all be digitally signed on the server, to reduce the risk of tampering.

I hope that real-world situation helps with your planning. We are a Microsoft for Startups / Microsoft Partner company, so if you have a TAP that would let us test this before the preview, would love to participate. Thanks so much!

Webreaper commented 3 years ago

This would be totally awesome. My app (http://github.com/webreaper/damselfly) bundles the installers/zip for the desktop electron wrapper into the Docker images, and I've used some javascript interop between Electron and the server to determine if the current container matches the server that's providing its content. If not, the user is notified and can optionally download the DMG/zip/AppImage file from the server and upgrade. I'll probably implement one-click download/install at some point in the future. But it would be great if Blazor could provide all the scaffolding to do this automatically without me having to write the versioning management and server/desktop JS interop by hand.

rogihee commented 3 years ago

I think if Blazor Desktop is built on top of MAUI with WinUI3 which requires Win10 1809, then MSIX might be a good option as well.

JohnGalt1717 commented 3 years ago

@rogihee My perfect world is somewhere very close to that too. I'd like to see WinUI 3 across all of MAUI including Web and all other platforms and that Blazor Desktop would just be a markup syntax for MAUI...

Color-Dark commented 3 years ago

@mrlife the main goal for .NET 6 is to support the Windows and macOS desktop platforms, but we will surely have code running on Android and iOS as well, but it might not be fully supported at that time.

So, would it not support Linux desktop platform?

shashank-shekhar commented 3 years ago

@kmanev073 said:

Is this available in the .NET 6 Preview 1? Thanks in advance.

It is not in Preview 1. We plan to have this in no later than Preview 4.

@Eilon is there a planned cadence for the preview releases?

Eilon commented 3 years ago

@shashank-shekhar - This is all part of .NET 6, so when the code is ready it will be in the next .NET 6 preview. We're hoping to get something into .NET 6 Preview 3, but no later than .NET 6 Preview 4.

Eilon commented 3 years ago

@Lucifer-Morning-Star said:

So, would it not support Linux desktop loatforms?

Linux is not currently planned, but with .NET MAUI (much like Xamarin.Forms) it's conceivable that it could be added in the future.

tub5 commented 3 years ago

@Eilon said:

Linux is not currently planned, but with .NET MAUI (much like Xamarin.Forms) it's conceivable that it could be added in the future.

Damn, that's a deal breaker for us. Looks like we'll have to stick with Electron.NET for the foreseeable.

Kryptos-FR commented 3 years ago

@tub5 have a look at Avalonia UI or Uno.

tub5 commented 3 years ago

@Kryptos-FR we looked at both previously but decided using Blazor with Electron.NET would suffice until the Blazor Desktop Applications came about. As our application is written using Blazor, when the ability is implemented, the migration should take a matter of days rather than weeks/months recreating the UI.

Color-Dark commented 3 years ago

@Lucifer-Morning-Star said:

So, would it not support Linux desktop platform?

Linux is not currently planned, but with .NET MAUI (much like Xamarin.Forms) it's conceivable that it could be added in the future.

So,

@Lucifer-Morning-Star said:

So, would it not support Linux desktop patform?

Linux is not currently planned, but with .NET MAUI (much like Xamarin.Forms) it's conceivable that it could be added in the future. So, Is it possible give a way to make the Blazor applications to desktop platforms just like SteveSanderson's attempt (https://github.com/SteveSandersonMS/WebWindow) . ,or make this lib have a official support in .NET 6 ?It may be a easy way to support Linux desktop platforms in a short time.

RChrisCoble commented 3 years ago

I believe Linux was only descoped from .Net 6 during their planning. I would imagine we'll see that re-scoped for .Net 7.

You can see on this page the Feature still mentions Linux, but they removed it from the actual feature once you click on it.

Color-Dark commented 3 years ago

I believe Linux was only descoped from .Net 6 during their planning. I would imagine we'll see that re-scoped for .Net 7.

You can see on this page the Feature still mentions Linux, but they removed it from the actual feature once you click on it.

This really is a bad newsπŸ˜’. Hope it would come in .NET 7.

RChrisCoble commented 3 years ago

I believe Linux was only descoped from .Net 6 during their planning. I would imagine we'll see that re-scoped for .Net 7. You can see on this page the Feature still mentions Linux, but they removed it from the actual feature once you click on it.

This really is a bad newsπŸ˜’. Hope it would come in .NET 7.

It's being discussed here, weigh in on what you think is important.

sinand99 commented 3 years ago

Trying to run web apps on desktop is plain stupid. If you want desktop app, build a native app, so simple. You should focus your energy to make Blazor to work better on browsers.

RChrisCoble commented 3 years ago

Trying to run web apps on desktop is plain stupid. If you want desktop app, build a native app, so simple. You should focus your energy to make Blazor to work better on browsers.

Depends on your use case. Some of us would like to create an experience that can execute on Web, OnPrem, Mobile, etc. using the same code base and UI layer. From that perspective Blazor Desktop is awesome from a "write once deploy everywhere" standpoint. Don't try that with MAUI, or any other Windows UI technology ever created previously.

thomaslevesque commented 3 years ago

Trying to run web apps on desktop is plain stupid. If you want desktop app, build a native app, so simple. You should focus your energy to make Blazor to work better on browsers.

I think you underestimate the value of having a single framework to build apps on the web and on many desktop platforms, with a single code base. Native apps are fine (and actually better in some ways, e.g. they typically have better performance), but you need to redevelop them for every platform you want to support, possibly in addition to the web app. Why do you think Electron is so successful, even though it creates horribly bloated apps?

tub5 commented 3 years ago

Trying to run web apps on desktop is plain stupid. If you want desktop app, build a native app, so simple. You should focus your energy to make Blazor to work better on browsers.

This is such a horrible take. .NET Core/5.0+ is designed to be multi-platform. The core functionality, i.e. the backend, compiles down to native. Why wouldn't you want to use a single way to create a user interface? What is the difference between using Blazor to generate this interface over XAML through Xamarin/WinForms/WPF?

The amount of issues through different implementations on different operating systems would dramatically reduce and it would slash the amount of development time enhancing and migrating features.

sinand99 commented 3 years ago

Trying to run web apps on desktop is plain stupid. If you want desktop app, build a native app, so simple. You should focus your energy to make Blazor to work better on browsers.

I think you underestimate the value of having a single framework to build apps on the web and on many desktop platforms, with a single code base. Native apps are fine (and actually better in some ways, e.g. they typically have better performance), but you need to redevelop them for every platform you want to support, possibly in addition to the web app. Why do you think Electron is so successful, even though it creates horribly bloated apps?

Yes, write-once-run-everywhere sounds wonderful for lazy developers but it should be done with a proper framework which compiles the code to its native controls on every platform and runs natively, not by creating some web controls and emulating them in a fake browser. I think that Microsoft is planning to do the latter when they say "web-based rendering". I just don't want Blazor to turn into Electron fiasco. It is like creating a windows app and packing it into a VM just to force it to work under Linux or MacOS (which has so little userbase compared to Windows btw). It just creates bug-ridden montrosites and have horrible performance.

sinand99 commented 3 years ago

Trying to run web apps on desktop is plain stupid. If you want desktop app, build a native app, so simple. You should focus your energy to make Blazor to work better on browsers.

This is such a horrible take. .NET Core/5.0+ is designed to be multi-platform. The core functionality, i.e. the backend, compiles down to native. Why wouldn't you want to use a single way to create a user interface? What is the difference between using Blazor to generate this interface over XAML through Xamarin/WinForms/WPF?

The amount of issues through different implementations on different operating systems would dramatically reduce and it would slash the amount of development time enhancing and migrating features.

If you don't know the difference between Blazor and WinForms, you should educate yourself then. Blazor' goal is to replace WebForms, not "a single way to create a user interface". That is the MAUI's job. But there is a long time until that, since true multi-platfrom is still a dream imo. Your super multi-platfrom app will stop working when any of the OS you support implements a breaking change via a major update. You have to constantly maintain it to keep it working and behaving/looking the same on all platforms. As a software developer, you wouldn't wanna give your users a bloated crap, just to make it cross-platform.

Webreaper commented 3 years ago

Sinan, Blazor's job is not "to replace Webforms", there's much more to it than that. And all the problems you describe are solved by using browser/HTML based UIs, implicitly. Writing individual native UIs for every platform is pointless when it's possible to write a great UI that'll work on all platforms (including mobile) without even having to buy hardware for the other platforms.

I'm not sure what you're trying to suggest with the line you're going down - but to take the line you're taking on this issue seems somewhat strange to me. If you want to write individual native UIs for all platforms, there's nothing stopping you doing that, but for those of us who are happier with write-once, run anywhere, this Epic is exactly what we're looking for.

tub5 commented 3 years ago

If you don't know the difference between Blazor and WinForms, you should educate yourself then.

You're making yourself look like a fool. Stop being so rude. WinForms was a simple example of creating an application with a GUI, the same way you will be able to with Blazor Desktop Applications, not a literal comparison.

Blazor' goal is to replace WebForms, not "a single way to create a user interface"

WebForms died off a long time ago, I have no idea why you think Blazor is directly replacing it?

That is the MAUI's job. But there is a long time until that, since true multi-platfrom is still a dream imo

That is one option. Why wouldn't you allows developers the option to choose which they would prefer. Electron has been around for a while and has become a big success. Doing the same for Blazor whilst improving efficiency and lowering the resources/package size is logical.

Your super multi-platfrom app will stop working when any of the OS you support implements a breaking change via a major update. You have to constantly maintain it to keep it working and behaving/looking the same on all platforms

And that is going to change with Xamarin/MAUI?

As a software developer, you wouldn't wanna give your users a bloated crap, just to make it cross-platform.

Again, that is going to change with Xamarin/MAUI? Apps created for Android using Xamarin were found to actually run faster and were far lighter than those built using Android Studio.

b-straub commented 3 years ago

IMHO neither GitHub nor this Epic is the right place for this kind of discussion, this is still a free world and no one is in any way preventing a developer from choosing the right platform for his needs, the right OS, the right smartphone or whatever. Please let's leave this discussion to what it was meant for and stop proselytizing each other.

Eilon commented 3 years ago

Hi everyone, let's try to lower the temperature here just a bit... It's important to remain respectful of everyone's opinions even when we disagree.

garrynewman commented 3 years ago

Just want to throw my support in for this. I made a Blazor desktop app and it was lots of fun and a really nice way to work.

NickBehrends commented 3 years ago

@shashank-shekhar - This is all part of .NET 6, so when the code is ready it will be in the next .NET 6 preview. We're hoping to get something into .NET 6 Preview 3, but no later than .NET 6 Preview 4.

@Eilon is this still planned for Preview 4? I see we got MAUI for windows in Preview 3 but no mention of blazor, wanted to check in as I don't see it on the Preview 4 WIP Epic.

Eilon commented 3 years ago

Oh yeah @NickBehrends you bet it's in! The .NET MAUI parts of BlazorWebView are all in the https://github.com/dotnet/maui repo, so it's not always easy to see the progress from other repos. The .NET MAUI BlazorWebView code is already in, and I'm working on the project templates now. All the previews ship at the essentially the same time (as far as I know), so you'll have it in your hands very soon!

MichaelPeter commented 3 years ago

Oh yeah @NickBehrends you bet it's in! The .NET MAUI parts of BlazorWebView are all in the https://github.com/dotnet/maui repo, so it's not always easy to see the progress from other repos. The .NET MAUI BlazorWebView code is already in, and I'm working on the project templates now. All the previews ship at the essentially the same time (as far as I know), so you'll have it in your hands very soon!

Awsome @Eilon! I, must admit I am stalking your github activity for a while already πŸ˜‰, and saw you checked in Blazor WebView for Android already! Will it come for IOS and Android too? Maybe intended for Preview 4 and 5 already? No worries - we tell no one πŸ˜‹

Eilon commented 3 years ago

For .NET 6 we will ship:

realZhangChi commented 3 years ago

Hi, @Eilon I see that the 6.0-preview4 milestone has been closed but not yet released. Will blazor desktop be released in the last few days along with preview4 or will it wait until 6.0-preview5?😊

Eilon commented 3 years ago

It's in preview 4 but coming from the MAUI repo so the bug tracking is a bit weird. It's a bit confusing even for me!

ivanjx commented 3 years ago

Will blazor desktop have something like this? It is basically just creating a frameless window and let custom div to drag and move the window. Thanks.