Closed erdikalleci closed 8 months ago
Hi @erdikalleci,
Thanks for your question.
As far as I know, it is not possible to integrate a Blazor Server application with MAUI using a common interface. This is because Blazor Server applications are hosted on a server and communicate with the client using SignalR. MAUI, on the other hand, is a framework for building native mobile and desktop applications.
However, if you are using Blazor WebAssembly, it is possible to do some refactoring to build a hybrid application that can be used with MAUI.
Thanks @neozhu
Due to the situation, I think I should make webview etc. applications for android for example.
Well, can I make a component library that I can use in common with this blazor server and use it with blazor maui? Like Blazor Server <= Component Library => Blazor Maui.
I don't know how efficient it would be if I used httpclient for data transfers in both server and WASM. What do you think? Or what is the proper way to do this? Do you have any advice?
Yes, you can indeed create a component library based on WebAssembly that can be shared between Blazor Server and Blazor MAUI applications.
For your specific scenario, you might want to look into the Blazor Web App project template. When you select the Interactive render mode option set to Auto (Server and WebAssembly), all pages will be available in the BlazorApp.Client project. This means that projects targeting Blazor WebAssembly can also support deployment on the server side, whereas server-side projects do not support WebAssembly client deployment. This flexibility could significantly benefit your development process, allowing you to write your code once and deploy it in both environments without major modifications.
I hope this helps! Feel free to ask if you have any more questions or need further clarification.
Thanks @neozhu
Review.
As you can see in my title, is it possible to allocate a common interface in this application and output windows, android, ios etc. with MAUI with this common area?