Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WebSite project type to MAUI Hybrid project type (Blazor Hybrid + Web) #1069

Open
HolyOne opened this issue May 22, 2021 · 14 comments
Open
Assignees
Labels
area/blazor 🕸️ Blazor Hybrid / Desktop, BlazorWebView discussed Created by mkArtakMSFT to help with planning temporarily. It will be removed after planning is done. needs-prototype Priority:1 Created by mkArtakMSFT proposal/open t/enhancement ☀️ New feature or request

Comments

@HolyOne
Copy link

HolyOne commented May 22, 2021

I write my code in blazor and razor in MAUI Hybrid.
It lets me to build my app for desktop and mobile, why not web?

@Brocks404
Copy link

Same question for me.
Multi Plattform Applications, Same Code but Web is not Included :(

@vhugogarcia
Copy link
Contributor

If MAUI allows on preview 5 the ability to create Web Assembly either using blazor or any other will be awesome. It will be just perfect and super multiplatform, due to it can be used for platforms like LG WebOS, web systems, etc.

@Sun3
Copy link

Sun3 commented May 28, 2021

I believe that having a single project, write code and compile for mobile, desktop, and web... is really needed. Not including the web would be not good. If you look at Flutter they already support all of these platforms.

Thanks.

@mohaaron
Copy link

I vote for this as well.

@gustav3d
Copy link

Being able to wrote both server and client side coce in ONE language for all major platforms (including Web), would be awesome.

Im not aware of any viable way of doing it now.

Flutter does this in theory, But Darts inherent bad design as language regarding performance makes it a no go on the server side and hence there is not any strong server side eco system developing.

@codemonkey85
Copy link

I would love if, at the very least, there were RCL and Blazor web (either WASM or server-side) projects included along with the MAUI project in a Blazor Maui template.

@Hecatron
Copy link

Hecatron commented Jun 29, 2021

I recently worked on this which might be useful, multiple frontends where the common blazor stuff is located under DefaultBlazor.Desktop.Common
This includes Android (Maui), WinUI (Maui), Winforms, WPF, Web, Chromely (for linux)
Possibly also Mac / IOS via Maui although I've not tried that

Although bearing in mind the way Blazorwebview works is similar to server side Blazor instead of wasm
But there is a wasm template further up the directory tree as well if you're looking for one.

MudBlazor/Templates#17
https://github.com/Hecatron-Forks/MudBlazor.Templates/tree/master/DefaultBlazor.Desktop

@Eilon Eilon added the area/blazor 🕸️ Blazor Hybrid / Desktop, BlazorWebView label Jul 8, 2021
@Eilon
Copy link
Member

Eilon commented Jul 8, 2021

This is certainly something we will consider. We're anticipating that many developers choosing .NET MAUI Blazor will re-use Blazor components in a web app as well, so setting things up in this manner could be convenient. Of course, some people might already have RCLs that they built and want to use, so if this template also has an RCL, it might be annoying. We'll have to figure something out here!

@Hecatron
Copy link

Hecatron commented Jul 9, 2021

For info you can pretty much write everything for the app in a Razor Control Library with Blazor components.
Then have a small wrapper project for hosting it on web / maui or anything else, that's what I did with the above example.
Where as DefaultBlazor.Desktop.Common is basically the whole app, and all the other projects are just hosting it in different ways.

The only thing I couldn't put into the RCL which tends to be more front end specific is the root index page where the blazor page is hosted.
You probably could put a some of it into the RCL but there are still frontend specific stuff such as which blazor js file to use for webview or server side web etc. If to use a raw index.html file (typical for winforms / wpf) or a cshtml for web etc.
Fortunately that's fairly minimal.

@jsuarezruiz jsuarezruiz added this to Under consideration in Enhancements Oct 26, 2021
@Eilon Eilon added this to the Blazor Backlog milestone Dec 8, 2021
@Eilon Eilon modified the milestones: Blazor Backlog, Future Feb 11, 2022
@Martinn2

This comment was marked as off-topic.

@evolcano
Copy link

evolcano commented Sep 3, 2022

I need a United solution, please make Blazor be a part of MAUI.
May use Blazor to Implement a new Platform-Target for WEB? Which is parallel with existed platforms of Windows, iOS and Android. You can choose to compile MAUI solution into WEB Server. The web UI can be appropriately simplified, interacting with the server and refreshing the page through server side events (or proxy).

@Hecatron
Copy link

Hecatron commented Sep 4, 2022

I need a United solution, please make Blazor be a part of MAUI.
May use Blazor to Implement a new Platform-Target for WEB? Which is parallel with existed platforms of Windows, iOS and Android. You can choose to compile MAUI solution into WEB Server. The web UI can be appropriately simplified, interacting with the server and refreshing the page through server side events (or proxy).

To be clear MAUI isn't web, it's basically a renamed / newer version of Xamarin.Forms
Which was a UI library originally designed for mobile devices such as Android / IOS etc.
It was originally one of the first ways to write Android / IOS apps in CSharp outside of Java
Now MAUI also targets Windows as well as mobile, but not Linux unfortunately.

Blazor on the other hand is Web, it's main difference compared to other frameworks is that .Net code can be compiled into web assembly then run inside the web browser.
If you want something that will run as an application under Windows / Linux / Mobile etc then blazor is you're best bet with something like Mudblazor in combination with WebView2.

Blazor can be hosted "inside" MAUI / WebForms / WPF Apps using a special control called webview2 which is a stripped down version of MS Edge without all the browser bloat. It's something included by default under Windows 11 I think.
For Linux you also have options such as Chromely which is a way of running a webpage as an App similar to Electron but minus the bloat.

@mkArtakMSFT mkArtakMSFT added the Priority:1 Created by mkArtakMSFT label Dec 1, 2022
@mkArtakMSFT mkArtakMSFT modified the milestones: Backlog, .NET 8 Planning Dec 1, 2022
@mkArtakMSFT mkArtakMSFT added the discussed Created by mkArtakMSFT to help with planning temporarily. It will be removed after planning is done. label Dec 2, 2022
@danroth27 danroth27 changed the title [Enhancement] Add WebSite project type to MAUI Hybrid project type Add WebSite project type to MAUI Hybrid project type Dec 8, 2022
@danroth27 danroth27 changed the title Add WebSite project type to MAUI Hybrid project type Add WebSite project type to MAUI Hybrid project type (Blazor Hybrid + Web) Jan 12, 2023
@danroth27
Copy link
Member

Hi folks! Please note that we're now using this issue to track creating a single project experience for Blazor Hybrid + Web.

For folks interested in .NET MAUI supporting web as a target platform with XAML please refer to #4528.

@mkArtakMSFT mkArtakMSFT modified the milestones: .NET 8 Planning, Backlog May 25, 2023
@msftbot
Copy link

msftbot bot commented May 25, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@samhouts samhouts modified the milestones: Backlog, .NET 9 Planning Sep 26, 2023
@Eilon Eilon modified the milestone: .NET 9 Planning Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/blazor 🕸️ Blazor Hybrid / Desktop, BlazorWebView discussed Created by mkArtakMSFT to help with planning temporarily. It will be removed after planning is done. needs-prototype Priority:1 Created by mkArtakMSFT proposal/open t/enhancement ☀️ New feature or request
Projects
Enhancements
Under consideration
Development

No branches or pull requests