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

[Feature request] Add support for Blazor Hybrid apps with MAUI #44

Open
vgb1993 opened this issue Jun 7, 2022 · 5 comments
Open

[Feature request] Add support for Blazor Hybrid apps with MAUI #44

vgb1993 opened this issue Jun 7, 2022 · 5 comments

Comments

@vgb1993
Copy link

vgb1993 commented Jun 7, 2022

Is your feature request related to a poblem? Please describe.

As a user of Radzen Studio I would like to create Blazor Hybrid apps with .NET MAUI.
Also, I would like to target multiple project types at the same time. Ex: Server & Hybrid.

Describe the solution you'd like

Appart from WebAssebly and Server a third option should be added for Blazor Hybrid apps.

Describe alternatives you've considered

I have not considered any alternatives

Additional context

In my opinion, the components generated by the designer should be located in a .NET library, not in the main project itself. This would make it possible to import the library from multiple aplication types at the same time.

This change would have an interesting side effect: I would be able to import this library in existing projects.

Blazor Hybrid really is a game changer for .NET, this would be a very usefull feature!

@akorchev
Copy link
Contributor

akorchev commented Jun 9, 2022

Unfortunately I don't think we could provide first class support for Hybrid as as far as I know it supports native components. Radzen Blazor Studio can only support web stuff in design time. Or maybe I got it wrong? Can you elaborate on this scenario?

@vgb1993
Copy link
Author

vgb1993 commented Jun 9, 2022

Hy there,

Esentially Blazor Hybrid adds a new hosting model for Blazor apps. But it's still Blazor and it's still Web UI. Let's say you have a RazorClassLibrary with some components, pages, styles and other stuff. This library can be hosted with Blazor Wamb, Server and now Hybrid too.

The way Hybrid works is by running the C# code natively in the MAUI app, but the rendering takes place inside a WebView2 component. It's very similar to Blazor Server but instead of running your C# code in the server, it runs on the app and it uses a InterProcessComunicationChanel instead of SignalR. So it's still Web UI, but managed by code running natively on the client.

So the way this could work (I hope) is by geneating the UI code in a libray that is consumed by 3 kind of projects: Server, WASM and MAUI.

This would make it possible to develop UIs using Radzen for native apps. Scince a WebView2 can expand acroos the whole native screen, you would not have to write more than one single native component: The BlazorWebView native component pointing at the RazorClassLibrary. Pretty straight forward stuff, very few lines of native code.

Check out this link for more info:
https://devblogs.microsoft.com/dotnet/hybrid-blazor-apps-in-mobile-blazor-bindings-july-update/

@akorchev
Copy link
Contributor

We will check the default dotnet new MAUI templates (if there are any) and see if we can add it as an option.

@h5kk
Copy link

h5kk commented Dec 31, 2023

We will check the default dotnet new MAUI templates (if there are any) and see if we can add it as an option.

Any updates on this? It should seem fairly simple considering Blazor Web Application, Blazor Server Application, and Blazor WebAssembly Application types are all supported.

Thanks.

@akorchev
Copy link
Contributor

It is on the roadmap. And unfortunately isn't "fairly simple" at all (I wish it were).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants